srushti_kansagara's avatar

What’s your Laravel admin panel setup? CDN vs local build best practice

Hi everyone,

I build admin panels for mobile apps using Laravel. Right now my approach is very simple but probably outdated:

-- I download AdminLTE 3 manually.

-- I copy the dist/ and plugins/ folders into my public/ directory.

-- I link the CSS and JS directly in my Blade layout.

This works, but I’m stuck on old Bootstrap 4 and jQuery. AdminLTE 4 doesn’t include the plugins/ folder anymore, so I’m not sure how I’m supposed to handle plugins like DataTables, Select2, Chart.js, etc.

I also see mixed advice about using CDNs. Some people say it’s fine to use Bootstrap, jQuery, and DataTables from a CDN in production, others say everything should be self-hosted or bundled with npm and a build tool like Mix or Vite.

I’d like to know what other Laravel developers do in practice:

  1. Do you use an admin template like AdminLTE or do you build your own dashboard layout with Bootstrap or Tailwind?

  2. Do you install everything with npm and compile assets with Vite or Mix, or do you prefer using CDNs for libraries like Bootstrap and jQuery?

  3. Is it really bad to rely on CDNs for production sites, or is it fine for admin dashboards where performance and cache benefit might be worth it?

I want to improve my workflow and keep things modern and clean without making deployment too complicated.

Would love to hear how you handle this in your projects.

Thanks for any advice or examples.

0 likes
2 replies
martinbean's avatar

@srushti_kansagara Personally, I’d just use something like Filament. Admin panels is a problem that has been solved umpteen times before, and life’s too short to make yet another one from scratch.

For your question about using a CDN versus not using a CDN, I’d say the benefits aren’t worth it for a CMS or admin panel that only a small number of users are going to be using, and will be using it sporadically. It’s not like your CMS/admin panel is going to get millions of concurrent visitors all day, every day. And when a browser downloads a CSS or JavaScript file, it usually caches it client-side any way, so what is the point of making a network request to an entirely different host (the CDN), just to get the same file that’s going to be cached locally after the first request any way?

Please or to participate in this conversation.