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

Light Bootstrap Dashboard Laravel Package

renderbit/light-bootstrap-dashboard

A Laravel package that bundles the Light Bootstrap Dashboard admin theme, giving you ready-made Blade layouts, views, and UI components so you can quickly scaffold a clean, responsive dashboard for your PHP application.

View on GitHub
Deep Wiki
Context7

Getting Started

Install

composer require renderbit/light-bootstrap-dashboard

Requires Laravel 5.7–12 and PHP 7.4–8.4. The service provider (Renderbit\LightBootstrapDashboard\LightBootstrapDashboardServiceProvider) should be auto-discovered on Laravel 5.5+; on a locked-down 5.7 install, register it manually in config/app.php. If Composer's security-advisory blocking gets in the way on older Laravel, prefix with COMPOSER_NO_SECURITY_BLOCKING=1.

Publish what you need

The provider exposes three publish tags:

php artisan vendor:publish --provider="Renderbit\LightBootstrapDashboard\LightBootstrapDashboardServiceProvider" --tag=config   # lbd.php + sidebar-menu.php
php artisan vendor:publish --provider="Renderbit\LightBootstrapDashboard\LightBootstrapDashboardServiceProvider" --tag=public   # assets -> public/vendor/lbd
# optional: --tag=views  → resources/views/vendor/lbd for overrides

Assets are prebuilt — there is no npm/build step, so --tag=public is mandatory or the dashboard renders unstyled.

Set the minimum config

In .env: APP_NAME, APP_URL, and LBD_HOME_URL (falls back to the lbd_home_url() helper, which checks for the lbd.dashboard route before using config('lbd.home_url')).

First use case: your own dashboard page

  1. Add a route pointing at a controller or Route::view.
  2. Create a Blade view that extends lbd::layout, sets @section('title', 'Dashboard'), and fills the layout's content section (check src/resources/views/layout.blade.php for the exact section name — typically content).
  3. Optionally push page-specific plugins/assets with @push('styles') / @push('scripts').

Where to look first

  • README.md — config keys and the Laravel compatibility matrix.
  • config/lbd.php — branding, sidebar color, logos, demo toggle.
  • src/resources/views/layout.blade.php and layout-full.blade.php — the two shells you will extend.
  • src/resources/views/inc/ — head, scripts, sidebar-menu, demo, plus the box/card components.
  • src/routes.php + LightBootstrapDashboardController::setupMenus() — only loaded when demo is on, but the controller is the best worked example of menu wiring.

Explore with demo mode

Set LOAD_LBD_DEMO=true (config key lbd.load_demo_content) to register the /lbd/* demo routes and browse the theme's pages as a live style guide. Turn it off in production.

Implementation Patterns

Extending the shell

  • Use lbd::layout for authenticated/app pages (sidebar + navbar + footer) and lbd::layout-full for login, register, and lock screens.
  • Set the page title with @section('title', 'Reports') — the layout renders @yield('title') | {{ config('app.name') }}.
  • The inc/head and inc/scripts partials wrap their output in @section('styles') ... @show and @section('scripts') ... @show. Everything else must use @push('styles') / @push('scripts') so it stacks after the base theme assets.

Composing pages with the bundled components

@component('lbd::inc.card', ['title' => 'Revenue', 'category' => 'Monthly'])
    ...body...
@endcomponent

@component('lbd::inc.box', ['title' => 'Activity'])
    @slot('body') ... @endslot
@endcomponent

inc.card expects title, category, icon, footer_icon, footer; class_list defaults to card-stats. inc.box requires a body slot and accepts title, subtitle, footer, class_list, body_class_list. Treat these as the fast path for KPI tiles; drop to raw markup for anything unusual.

Menus (lavary/laravel-menu)

The package merges config('sidebar-menu') over laravel-menu.settings via array_replace_recursive, so you can override global menu behavior without touching the vendor config. Menu names: sidebar_main_menu, sidebar_user_menu, site_header_menu, site_footer_menu.

  • Build menus in a service provider (Menu::make('sidebar_main_menu', ...)) — the demo controller's setupMenus() is the reference.
  • Guard every optional menu with Menu::exists('...'), especially because layouts must render with demo content disabled.
  • inc/sidebar-menu.blade.php renders recursively; a parent item's #id href becomes the collapse target, and is_child_active() (in src/helpers.php) drives expand/active state.
  • Outside demo mode, render sidebar_user_menu yourself into the sidebar-user section.

Branding via config, not edits

sidebar_color (black/azure/blue/purple/green/orange/red), sidebar_image, logo_mini, logo_full, footer_logo, footer_link, plus google_maps_api_key / google_analytics_key. Prefer config overrides in config/lbd.php so you can still pull upstream view updates.

Overriding views

Publish --tag=views, then edit resources/views/vendor/lbd/.... Override the smallest partial possible (inc/head, inc/sidebar-menu) rather than forking layout.blade.php. The lbd:: namespace means Laravel's vendor-view override resolution picks these up automatically.

Integration with auth

Point Fortify/Breeze/Auth::routes() views at lbd::layout-full-based views, and route post-login redirects through lbd_home_url(). Keep the demo routes strictly out of production routing.

Using the demo as a spec

DemoEnabledTest in the test suite is the canonical list of demo routes. Reading it tells you which pages exist and therefore which layout/component combinations are known to work.

Gotchas and Tips

  • @push, not @section, for scripts. The base layout's asset partials use @show, not @yield. Using @section('scripts') in your page overwrites/blocks jQuery, Popper, Bootstrap, and the theme JS — a classic silent breakage where dropdowns and the sidebar collapse stop working.
  • Demo off must still render. Never reference route('lbd.*') unconditionally. Guard with Route::has('lbd...'), app('router')->has('lbd.dashboard'), or Menu::exists(). lbd_home_url() already does the route check for you — use it instead of hand-rolling route('lbd.dashboard').
  • Assets are prebuilt and outside the Vite pipeline. Every deploy needs storage/public symlink discipline and a fresh --tag=public after upgrading, followed by php artisan view:clear. Changes to config/lbd.php need config:clear (or config:cache re-run) — a common "my sidebar color didn't change" cause.
  • Menu config layering is a deep merge. array_replace_recursive means your sidebar-menu.php entries silently combine with laravel-menu.settings; the package default sets activate_parents to false for sidebar_main_menu. If parent items don't highlight, that's the switch to flip. Because it's a deep merge, an empty array value will not "unset" a vendor default — set the key explicitly.
  • Route namespace collision. Demo routes mount under /lbd behind the web middleware group. If your app already owns /lbd, either disable demo or rename; also check for a lbd.dashboard name clash before relying on lbd_home_url().
  • Active-state menus depend on route names, not URLs. is_child_active() compares against the current route; custom routes with unnamed or oddly-named routes produce a sidebar that never highlights. Name your routes and match route keys in the menu definition.
  • PHP 7.4 constraint if you contribute. No match, constructor promotion, named args, or union types. composer check-style (phpcs PSR-2 over src/ and tests/, Blade excluded) and composer fix-style are the loop; run vendor/bin/phpunit --filter testAllDemoRoutesAreRegistered after touching demo routes.
  • Testbench matrix. tests/TestCase.php boots Orchestra Testbench with the Menu provider/alias and points view.paths at tests/Fixtures/views; subclasses set protected $loadDemoContent because routes register at boot. Add a test to DemoEnabledTest whenever you add or remove a demo page, and update routes.php, the controller, and setupMenus() together.
  • Third-party API keys are opt-in. google_maps_api_key and google_analytics_key are only consumed by specific partials; don't ship them in committed config, and don't publish views just to blank them out.
  • Small-package risk. Zero stars and no dependents means thin community coverage. Pin the version in composer.json, and note that MIT licensing plus plain Blade means the pragmatic escape hatch is to publish the views and vendor them into your app if the package stops tracking Laravel releases. The extra.branch-alias major is documented to track the README compatibility matrix, so verify it after any major upgrade.
  • Behaviour changes need docs. The project convention is Conventional Commits, SemVer, and a CHANGELOG.md entry under ## Unreleased (marking breaking changes with **Breaking:**) plus a README update — follow it if you send patches upstream, and read it to gauge how stable a given release is.
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.
uni-method/symfony-lib
tacticmedia/scim-server-bundle
neika-ai/symfony-bundle
mattleads/agent-publishing-bundle
glavweb/framework-bundle
glavweb/extra-bundle
glavweb/api-bundle
glavweb/admin-bundle
adachsoft/api-version-bundle
elsayed85/laravel-api-exceptions
ouhssini/laravel-demo-mode
daworks/ncloud-outbound-mailer-driver
gp247/cms
ignibyte/aic-gates
nexa-merchant/blog
novasa/laravel-language-center
opencage/geocode
adolfoholzer/parameters
livenetworks/ln-starter
cgv/localized-resource