<?php

use App\Http\Controllers\website\IndexController;
use App\Models\Mailbox;
use App\Models\User;
use Illuminate\Support\Facades\Artisan;
use Illuminate\Support\Facades\Log;
use Illuminate\Support\Facades\Route;



Route::get('/', [IndexController::class, 'index']);
Route::get('/get-monthly-package', [IndexController::class, 'getMonthlyPackage'])->name('getMonthlyPackage');
Route::get('/get-yearly-package', [IndexController::class, 'getYearlyPackage'])->name('getYearlyPackage');

Route::get('storage', function () {
    Artisan::call('storage:link');
    return 'success';
});

Route::get('test', function () {
    $id = Mailbox::orderBy('id', 'desc')->first()
        ? (int)str_replace('m-', '', Mailbox::orderBy('id','desc')->first()->mail_id) + 1
        : config('app.tracking_id');

    dd($id);
});

