How to include External CSS and JS file in Laravel 5

后端 未结 14 1796
庸人自扰
庸人自扰 2020-11-30 19:18

I am Using Laravel 5.0 , the Form and Html Helper are removed from this version , i dont know how to include external css and js files in my header file. Currently i am usin

14条回答
  •  萌比男神i
    2020-11-30 19:44

    I think that the right way is this one:

    
    

    Here I have a js directory in the laravel's app/public folder. There I have a jquery.js file. The function URL::asset() produces the necessary url for you. Same for the css:

    
    

    Hope this helps.

    Keep in mind that the old mehods:

    {{ Form::script() }}
    

    and

    {{ Form::style() }}
    

    are deprecated and will not work in Laravel 5!

提交回复
热议问题