skip to Main Content

I am using laravel 11 with inertia vuejs. I have two seperate route one is api and one is admin. Full application working perfectly on local but when I upload to server than show not found on web route.

Web route is admin using Inertia vue but api did work perfectly.

please help me

2

Answers


  1. Chosen as BEST ANSWER

    I solved this error. The problem is on my custom ServicePorvider. Thanks for answer.


  2. Check Web Route Configuration:
    Double-check your web.php or admin.php route file to ensure that all routes for the admin panel are defined correctly and that no conditions or middleware are preventing them from loading. Also, ensure that you’re using the correct route definitions for Inertia:

    Route::middleware(['web'])->group(function () {
        Route::get('/admin', [AdminController::class, 'index'])->name('admin.index');
    });
    

    If Web Route Configuration is correctly, Ensure that your Inertia routes are correctly configured to point to Vue components in the admin route:

    Route::get('/admin/{any?}', function () {
        return Inertia::render('AdminDashboard'); // Replace with your admin component
    })->where('any', '.*');
    
    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search