Support the ongoing development of Laravel.io →
Blade Views Mix

Hi There, I want a little help from you guys. The method i use to integrate an admin panel Dashboard template in laravel is :

  1. Place all the template assets (HTMLs,Css,Js etc) in Public directory.
  2. Call them in Master or app file in blade.

Is it the right way of integrating template in laravel? (Placing assets in Public Directory) Or this is the bad way of template integration?

I have also seen , some people add these assets to Resources directory then compile them (I don't know how or why they do so).

I always doubt about my way of doing things. So what would be the best way of integrating template in laravel? Is it ok to do this in the way i use to? (Just placing assets in public directory)

Thanks

Last updated 3 years ago.
0

While I'm not an expert I believe for development the best process is to put assets in the resources folder and then compile them to the public folder.

Why so ?

Well you keep sustainability in your project because everything is centralized and also you follow a common development process of the applications, you keep the resources readable for developers and you also get to keep track of compilations you do if I remember correctly using Laravel mix.

Therefore my opinion goes in:

Use resources folder with your assets and then compile them.

(from stackoverflow: https://stackoverflow.com/a/28496384)

0

Sign in to participate in this thread!

Eventy

Your banner here too?

Adeel Fiaz adeelfiaz Joined 16 Mar 2020

Moderators

We'd like to thank these amazing companies for supporting us

Your logo here?

Laravel.io

The Laravel portal for problem solving, knowledge sharing and community building.

© 2025 Laravel.io - All rights reserved.