1

I have a resource controller and none of the views related to them has any javascript or CSS. And the fact is that it loads the layout file which is correct for any other views not related to the resource. And here is another thing. When I comment the resource route and write a route like this :

 Route::get('/create', 'ToursController@create'); 

The page loads CSS but when I write like this:

`Route::get('/tours/create', 'ToursController@create');` 

it doesn't work.

1 Answer 1

1

It is not working because you are including it without asset()

try like this

<link href="{{ asset('path/to/css') }}" rel="stylesheet" type="text/css" />

and for JavaScript

<script src="{{ asset('assets/js/jquery.slimscroll.js') }}"></script>
Sign up to request clarification or add additional context in comments.

3 Comments

Thank you, sir! It really helped me out.
And thank you for the edit as well! It was my first question ever here and I didn't know how to write properly.
@Capt.BlackBearD Welcome

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.