backpack/theme-coreuiv4
CoreUI v4 theme for Backpack for Laravel. Applies CoreUI 4 styling, layouts, and components to Backpack admin panels, giving CRUD screens, forms, tables, and navigation a clean, modern look. Install via Composer and set it as your Backpack theme to refresh the admin UI.
This is a theme package for Backpack v6, not a standalone admin panel — it does nothing on its own. You need an app that already runs backpack/crud ^6, then you swap the UI layer.
Minimal path:
composer require backpack/theme-coreuiv4
Then publish whatever the package's service provider exposes (check the README for the exact provider FQCN and tags — publishing is usually required so views/assets land somewhere you can override):
php artisan vendor:publish --provider="Backpack\ThemeCoreuiv4\ThemeCoreuiv4ServiceProvider"
php artisan optimize:clear
Finally point Backpack at the theme in config/backpack/ui.php (key name has historically been view_namespace; confirm in the package README):
// config/backpack/ui.php
'view_namespace' => 'backpack.theme-coreuiv4::',
Then:
php artisan view:clear
php artisan basset:cache # or basset:clear in local dev
Where to look first, in this order:
config/backpack/ui.php — the theme switch, logo, skin, and asset hooks live here.vendor/backpack/theme-coreuiv4/resources/views/ — this is the actual UI you're buying. Read layouts/ and inc/ first; everything else extends or includes them.ServiceProvider — this is where Basset entries and view-namespace registration happen, and it's the honest documentation for a 7-star package.routes/backpack/custom.php in your app — the dashboard route and its view.First use case: you already have a CoreUI v4 / Bootstrap 5 design system (or are migrating off CoreUI v2), and you want the admin panel to look and behave like the rest of the product instead of shipping a second visual language. Second most common: you want Bootstrap 5 utility classes in your custom CRUD views and widgets without rewriting them for Tabler.
Smoke test: log into /admin, load the dashboard, open one index, one create, one edit, and one show page, plus one modal (HasMany inline create or a select2_ajax field). Those five screens exercise ~90% of the theme surface.
Override views, don't fork the vendor. Publish to resources/views/vendor/backpack/theme-coreuiv4/... preserving the relative path exactly. Laravel's vendor override kicks in, you keep upstream fixes, and composer update stays safe.
Reference the theme namespace explicitly in custom pages. Any custom route/controller you write should render through the theme, not the backpack:: alias (which may still point at the old theme):
return view('backpack.theme-coreuiv4::dashboard'); // or your own view extending the theme layout
Custom widgets for the dashboard. Add via $this->addWidget() in your dashboard controller; build the widget blade from the theme's card partials so padding, headers, and borders match the rest of the panels. Copy an existing widget view from the vendor directory and strip it down — that's faster and more accurate than reading docs.
Assets via Basset, not @push. Register app CSS/JS in a service provider so production builds are cached:
Basset::styles([asset('css/admin.css')]);
Basset::scripts([asset('js/admin.js')]);
Use @push('after_styles') / @push('after_scripts') only for one-off page-specific scripts. The theme's layout exposes these stacks — confirm the stack names in layouts/dashboard.blade.php before relying on them, since they're the most common thing that silently disappears on a theme upgrade.
Custom form field views. If you've written custom Backpack fields, copy the theme's field view as a starting point rather than your old one. The Blade markup is Bootstrap 5 (form-select, mb-3, form-check), and Backpack's field wrappers expect that structure for error states and labels.
Deployment pattern that actually works:
composer install --no-dev -o
php artisan view:cache
php artisan basset:cache # required; without it assets are compiled on request
Basset's basset:cache is the single most important line in the deploy script for this package.
Keep the theme swappable. Put app-specific styling in your own CSS/Basset entries and your own published views, never editing vendor/. If you do it right, moving to theme-tabler later is a one-line config change plus fixing your overrides — and you will eventually want that option, given the package's size.
view_namespace isn't set, or stale views were published under the old theme's path (resources/views/vendor/backpack/base/...) and are still winning. Delete stale published vendor views before debugging anything else.php artisan basset:clear, then hard-refresh. In production, forgetting basset:cache means slow first paint and inconsistent assets across web nodes.form-group → mb-3, custom-select → form-select, data-toggle → data-bs-toggle, ml-*/mr-* → ms-*/me-*, float-right → float-end, .close → .btn-close. These don't error — they just look wrong, which is worse.php artisan view:clear after every publish or override addition; a stale compiled view will make you think your override path is wrong.public/vendor/backpack exists and is web-accessible, and that your web server isn't blocking the path. If you serve assets from a CDN, verify Basset's CDN config rather than assuming the package handles it."backpack/theme-coreuiv4": "1.x.y", not ^1.0), read every release note before bumping, and keep a short list of your overrides so a fork is cheap. If you need long-term stability and community answers, backpack/theme-tabler or the default theme is the lower-risk choice.dd(config('backpack.ui.view_namespace')) → php artisan view:clear → confirm the compiled view path in the exception trace → basset:clear → check public/vendor/backpack → only then start reading the package source.How can I help you explore Laravel packages today?