Answer the question
In order to leave comments, you need to log in
Answer the question
In order to leave comments, you need to log in
An example of how I implement it myself:
1. I write the following code in the template:
2. And in the blade files, I include scripts like this:
@section('js_files')
<script src="{{ URL::asset('js/bootstrap.js') }}"></script>
@endsection
as well as other variables, the principle is the same, only here instead of text there are links to js / css files.
send an array of links, and complete the master template section
I don't understand why these experiments when there are package managers, for example:
Stolz/Assets
In the controller:
Not to mention other advantages of using such managers. :-)
I do this through
in the main template
then in any subtemplates
@push('scripts')
Скрипты или ссылки на них
@endpush
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question