php - How do you add in assets to Laravel 4 from the public directory? -


i trying add in assets can't seem find solid answer online. {{}} not interpolating values , literally being written in source code. know why? current hello.php view is:

<!doctype html> <html lang="en"> <head>  </head> <body>     testing     <script data-main="{{ url::asset('public/js/main') }}" src="{{ url::asset('public/js/require-jquery.js') }}"></script> </body> </html> 

you have name file filename.blade.php in order use blade rendering engine.

if don't want use blade, can use regular php:

<script src="<?php echo url::asset('js/require-jquery.js') ?>"></script> 

p.s. path wrong (you don't need public/ part).


Comments

Popular posts from this blog

javascript - Count length of each class -

What design pattern is this code in Javascript? -

hadoop - Restrict secondarynamenode to be installed and run on any other node in the cluster -