Layout
AdminLTE 4 for Laravel ships a complete admin shell as Blade views. Your pages extend the adminlte::page layout and fill in a few sections; the package renders the navbar, sidebar, footer, color-mode toggle, ⌘K command palette, control sidebar and preloader around your content.
Extending the page layout
Most pages extend adminlte::page, a thin wrapper around adminlte::master:
@extends('adminlte::page')
@section('title', 'Dashboard')
@section('content_header')
<h3 class="mb-0">Dashboard</h3>
@stop
@section('content')
<p>Welcome to your dashboard.</p>
@stop
Render it from a route or controller like any Blade view:
Route::get('/admin', fn () => view('dashboard'))->middleware('auth');
Available sections and stacks
| Hook | Type | Purpose |
|---|---|---|
@section('title', '…') | section | Page title. Combined with title_prefix/title_postfix, falls back to config('adminlte.title'). |
@section('content_header') | section | Optional. Rendered inside .app-content-header. Omit it to drop the header bar. |
@section('content') | section | Required. Your page body, inside .app-content > .container-fluid. |
@push('css') / @yield('css') | stack / section | Per-page <link>/<style> tags emitted in <head>. |
@push('js') / @yield('js') | stack / section | Per-page <script> tags emitted at the end of <body>. |
@push('adminlte_css') | stack | Early <head> CSS, output before the Vite bundle. |
Scripts are placed at the bottom of <body>, after @pluginScripts; CSS is placed in <head>, after the Vite bundle and before @pluginStyles.
The shell
master.blade.php builds the document, assembles the <body> class list from config, then renders the partials around your content:
- Navbar (
.app-header) — sidebar toggle, a Home link, a Documentation link, the unified search pill (⌘K/Ctrl+Kopens the command palette), Messages / Notifications dropdowns, fullscreen toggle, color-mode toggle and user menu. - Sidebar (
.app-sidebar) — the brand logo and the config-driven treeview menu (app('adminlte')->menu('sidebar')), plus the "View documentation" CTA whensidebar_docs_urlis set. - Footer (
.app-footer) —footer_left/footer_rightrendered as raw HTML. - Control sidebar — a right-hand panel rendered only when
control_sidebaris enabled.
Body classes driven by config
| Config key | Class added |
|---|---|
layout_fixed_sidebar | layout-fixed |
layout_fixed_navbar | fixed-header |
layout_fixed_footer | fixed-footer |
sidebar_breakpoint (default lg) | sidebar-expand-{breakpoint} |
sidebar_mini | sidebar-mini |
sidebar_collapse | sidebar-collapse |
classes_body | appended verbatim |
bg-body-tertiary is always added. The <html> element reflects the active locale (lang) and dir (from layout_rtl).
Per-page assets
@extends('adminlte::page')
@section('title', 'Reports')
@section('content')
<x-adminlte-card title="Monthly summary">
<p>Your content here.</p>
</x-adminlte-card>
@stop
@push('css')
<style>.report-table th { white-space: nowrap; }</style>
@endpush
@push('js')
<script>console.log('Reports page ready');</script>
@endpush
The master layout includes @pluginStyles in <head> and @pluginScripts at the bottom of <body>. These run at request time, so any plugin a component enabled earlier in the same request is reflected. See Charts & Plugins.