Weave Code
Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Theme Coreuiv4 Laravel Package

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.

View on GitHub
Deep Wiki
Context7

Getting Started

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:

  1. config/backpack/ui.php — the theme switch, logo, skin, and asset hooks live here.
  2. 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.
  3. The package's ServiceProvider — this is where Basset entries and view-namespace registration happen, and it's the honest documentation for a 7-star package.
  4. 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.

Implementation Patterns

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.

Gotchas and Tips

  • Half-themed pages mean a namespace mismatch. If the dashboard looks new but CRUD pages don't, 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.
  • Basset caching will waste an afternoon. CSS/JS edits that don't appear are almost always stale Basset output. php artisan basset:clear, then hard-refresh. In production, forgetting basset:cache means slow first paint and inconsistent assets across web nodes.
  • Bootstrap 4 → 5 breakage is silent. CoreUI v4 is BS5, so any markup you carried over from a v4/v5 Backpack theme needs: 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.
  • Don't remove jQuery. CoreUI v4 doesn't need it, but Select2, date pickers, and several Backpack field types still do. Removing it breaks fields in ways that look like theme bugs.
  • View cache confusion after publishing. php artisan view:clear after every publish or override addition; a stale compiled view will make you think your override path is wrong.
  • Assets 404 on a fresh server. Check 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.
  • Maturity risk is the real gotcha. Seven stars, zero dependents, and a release date that's worth verifying on Packagist mean you are effectively an early adopter. Pin an exact version ("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.
  • Debugging checklist, in order: 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.
  • Extension points to remember: the config file (theme, logo, skin), Basset registration in your own service provider, published views under the vendor override path, and the layout's push stacks. Everything else in this package is implementation detail you should treat as private and override rather than call into.
Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
skyraptor/chatter
edlugz/sasapay
abbasudo/artisan-route
mirvan/ippanel
ignibyte/aic-framework
glavweb/data-schema-bundle
glavweb/datagrid-bundle
tacticmedia/scim-server
uni-method/frame
neika-ai/sdk
adachsoft/php-code-style
pharaonic/laravel-notification-dependencies
beautinow/translug
dev-brainiac/bot-cloaked
octoberrain/html
octoberrain/extension
octoberrain/exception
octoberrain/contracts
adachsoft/api-version-bundle
cgv/localized-resource