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
Post a Comment