0

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 2

0

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', '.*');
Sign up to request clarification or add additional context in comments.

Comments

0

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

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.