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

Laravel Boilerplate Laravel Package

labs64/laravel-boilerplate

A full-featured Laravel boilerplate and starter kit that ships with authentication, user, role and permission management, themes, settings, activity logs, API support, and an extensible admin foundation so you can bootstrap new applications quickly.

View on GitHub
Deep Wiki
Context7

Getting Started

Treat this as a starter kit, not a drop-in package — you clone the repo and own the resulting application. Day one looks like a normal Laravel bootstrap, not a composer require.

  1. Bring it up locally
    • git clone, then composer install and npm install.
    • Copy .env.example to .env, set DB_* and APP_URL, then php artisan key:generate.
    • php artisan migrate --seed (the seeders create the admin user, roles, permissions, and settings rows).
    • Build assets: npm run dev (or npm run watch while working).
    • Find the seeded admin credentials in database/seeds/UsersTableSeeder.php (or the equivalent seeder) before trying to log in.
  2. Orient yourself in the tree
    • routes/web.php — the admin prefix group and the middleware stack are the map of the app.
    • app/Http/Controllers/Admin/ — user, role, permission, log, settings controllers.
    • resources/views/themes/ — theme-specific Blade. Gentelella markup lives here; the layout you @extends is in themes/admin/layouts.
    • config/ — look for the menu, theme, and locale config files. These are the three knobs you'll touch most.
  3. First use case: a CRUD screen behind auth + role check Add a migration + model, scaffold a resource controller in Admin/, register routes inside the authenticated admin group, create index/create/edit views that extend the admin layout, and add one entry to the sidebar menu config. That single loop — route → controller → theme view → menu entry → permission seed — is 80% of what you'll do in this codebase.

Implementation Patterns

Routing and access control

  • Keep new admin routes inside the existing prefixed group so they inherit auth, locale, and role middleware. Don't create a second parallel group with a hand-rolled stack.
  • Authorization is role/permission based, seeded in the database. Prefer @can / Gate::allows() in Blade and $this->authorize() in controllers over ad-hoc if (auth()->user()->isAdmin()) checks — the latter multiplies and rots.
  • When you add a feature that needs a new permission, add it in a seeder and assign it to roles there; otherwise existing seeded roles silently lose access after a fresh migrate.

Controllers and validation

  • Follow the existing controller shape: thin actions, FormRequest classes for validation, redirect-with-flash for writes. Consistency here matters more than elegance — the boilerplate's conventions are the onboarding docs for the next dev.
  • For list screens, mirror the existing pagination/search pattern rather than bolting on a JS grid; Gentelella's tables are plain Bootstrap and behave predictably with server-side pagination.

Views and the theme layout

  • Extend the admin layout and fill the sections it defines (content, and usually styles / scripts for per-page assets). Anything pushed into scripts must be guarded with @push/@stack, or page-specific JS leaks between screens.
  • Reuse the Gentelella panel/box partials for form and table chrome. Copy-pasting a panel from an existing view is the fastest route to visual consistency — the theme has a lot of markup per widget.
  • Keep business logic out of theme views. The theme directory is the most likely thing you'll replace wholesale later, so treat it as presentation-only.

Menu and navigation

  • Sidebar entries are config-driven. Add a route name, icon class, label, and any permission gate in the menu config, then clear cached config. Active-state highlighting usually keys off the route name, so name routes consistently (admin.foo.index, admin.foo.edit).
  • If a menu item doesn't appear, it's almost always a cached config or a permission the current role lacks — check both before touching the menu builder.

Localization

  • All user-facing strings go through __(). The boilerplate ships a locale middleware and a language switcher; new languages require a translation directory plus an entry in the locale config (and often a flag/icon mapping).
  • Add keys to every shipped locale, even if the value is the English string. Missing keys fall back silently and you won't notice until a user reports it.

Settings, logging, 2FA, themes

  • Application settings are typically DB-backed with a config cache in front. Read through the helper/config facade, not by querying the settings table directly, and bust the cache in the save path.
  • There's a DB log channel and an in-admin log viewer. Great for debugging in environments where you can't tail files; risky if left unpruned (see Gotchas).
  • Two-factor auth is part of the auth flow — when you customize login, test the 2FA-enabled path explicitly, including the "already enrolled" and "secret reset" branches.
  • Theme switching is config/middleware driven. If you add a second theme, it needs the same view contract as the admin theme or the switcher will produce blank pages.

Gotchas and Tips

  • Age is the headline risk. Last release was April 2020; expect Laravel 6/7-era conventions, PHP 7.x constraints, Bootstrap 3, and jQuery. Verify composer.json platform requirements before committing, and budget for an upgrade (or a hard pin on PHP) rather than assuming it drops into a modern stack.
  • Bootstrap 3 + jQuery will fight modern tooling. Don't mix in Bootstrap 4/5 components or Vue/Alpine widgets inside Gentelella pages without scoping. Keep new interactive bits in isolated containers with their own styles.
  • Config and permission caching cause "it didn't change" bugs. After editing menu, theme, locale, or permission configs: php artisan config:clear and php artisan cache:clear. In production, re-run config:cache as part of deploy. If using a permission cache, forget it after seeding.
  • Seeders must be idempotent. Re-running db:seed on a live-ish DB will duplicate roles/permissions/settings unless they use firstOrCreate/updateOrCreate. When you add seeds, follow that pattern.
  • DB logging grows fast. Schedule pruning of the logging table and cap the log viewer's date range. An unpruned log table is the classic cause of a slow admin dashboard six months in.
  • Asset pipeline assumptions. The theme expects compiled vendor assets. If styles look unstyled after setup, it's usually a missed npm run dev, a missing storage:link, or a package that needs vendor:publish for its assets.
  • 2FA lockouts are real. Back up the secret at enrollment, document the reset procedure, and make sure server time is NTP-synced — TOTP drift produces "invalid code" reports that look like bugs.
  • You own the merge problem. Because this is a starter kit, upstream fixes don't arrive via composer update. If you want to track upstream, keep your changes in clearly separated commits/paths so you can diff and cherry-pick instead of resolving a three-way merge across resources/views.
  • Testing: the auth scaffolding means feature tests need actingAs($user) plus the right role/permission attached. Seed minimal roles in test setup rather than relying on the production seeders.
  • Extension point to prefer: add new admin features as new controllers/routes/views alongside the boilerplate's, not by editing the shipped user/role/settings controllers. The shipped files are the ones you're most likely to want to replace or diff against upstream later.
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.
jinas/dhivatar
store-doc/laravel-storage-driver
plus-it/laravel-translation-manager
diephp/perhaps
diephp/telegraph
osmaviation/spreadsheet
microsoft/fluentui-system-icons
mmccook/php-json-canonicalization-scheme
middlewares/firewall
qubiqx/montapacking
nyoncode/laravel-package-console
pnscripts/filament-broadquill-lite
pnscripts/laravel-sentfold-lite
vleap/mx-sdk-laravel-internal
twidpay/utils
htetmyathlaing/scout-elasticsearch-driver
artisan-toolbox/front-awesome
ls/client-assistant
users-au/laravel-client
cgv/localized-resource