on3nx

how to load assets into laravel 'properly'

Posted 2 years ago by on3nx

Hi,

i'm still learning how gulp, npm, elixir and laravel - how are they related.

I know that if you want to load asset into laravel, you can just copy paste the file into the folder and load it directly from your blade template.

but i'm wondering , if i have jquery, or bootstrap or any standard/common (.js or .css) assets, how to load it 'properly' in laravel? - rather than i download and copy-paste the file and load it manually in blade template.

when i said 'properly' i'm referring to using npm and gulp, load it from internet repository, compile it and minify it then put it nicely in blade template with cache-buster.

Thanks, 1-nk

Please sign in or create an account to participate in this conversation.

Laracasts Mascot

Hi, Have We Met Yet?

Did you know that, in addition to the forum, Laracasts includes well over 1000 lessons on modern web development? All for the price of one lunch out per month.

Sign Me Up

Channels

Reply to

Use Markdown with GitHub-flavored code blocks.