Skip to content
Advertisement

style disappear when i add slash / after route

I’m using laravel 8

when I create a route for admin

Route::group(['prefix' => 'admin'], function () {
    Route::get('/', function () {
        return view('layouts.adminlayout');
    });
});

and try to display the admin page if I Type this route : http://localhost:8000/admin without slash after admin I see the page work perfectly

enter image description here

but when I add slash after admin : http://localhost:8000/admin/ The page appears without style

enter image description here

Advertisement

Answer

I find the solution

use : <link href="{{asset('style.css')}}" rel="stylesheet">

instead of : <link href="style.css" rel="stylesheet">

thank you @Quentin

User contributions licensed under: CC BY-SA
7 People found this is helpful
Advertisement