jeudi 3 septembre 2020

How can i integrate css/js from a HTML template into a laravel application?

Im importing a HTML template into my laravel application. i copied all the css/js files in their respective folders in the public directory. i did not change the the style links from

<link rel="stylesheet" href="css/style.css"/>

to

<link rel="stylesheet" href=""/>

as it was working just fine. However, for the show function , which takes a parameter, in my ShopController , the css is not applied. If i remove the parameter '$id' in show function and route, it works fine again. I donot understand why the css is applied to all the routes where no data is passed but fails for routes with passed data. Here is my route for products page

Route::get('/shop/{product}', 'ShopController@show')->name('shop.show');

ShopController:

 public function show($id)
{
    return view('product');
}


via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire