Reputation: 4392
As a Laravel newbie I have red the documentation on laravel.com. So far I really don't know where to create directories for my CSS files, image files, music files etc. I think it should be in the public directory, but not sure. As last question, how can I include those files in views within Laravel framework?
Upvotes: 0
Views: 226
Reputation: 1394
Yes you add any CSS, JavaScript, image, etc. files to your public folder.
| app
| public /
css/
images/
js/
Now if you wanted to easily use an image from within your view, you simply use Laravel's HTML
facade, like so
{{ HTML::image('images/name-of-image.png'); }}
If you want to include a css stylesheet, then you would again use the HTML
facade.
{{ HTML::style('css/styles.css') }}
Here is a list of Laravel's html helpers, http://www.laravel-tricks.com/tricks/generating-html-using-html-methods
Upvotes: 4