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

HookTypePurpose
@section('title', '…')sectionPage title. Combined with title_prefix/title_postfix, falls back to config('adminlte.title').
@section('content_header')sectionOptional. Rendered inside .app-content-header. Omit it to drop the header bar.
@section('content')sectionRequired. Your page body, inside .app-content > .container-fluid.
@push('css') / @yield('css')stack / sectionPer-page <link>/<style> tags emitted in <head>.
@push('js') / @yield('js')stack / sectionPer-page <script> tags emitted at the end of <body>.
@push('adminlte_css')stackEarly <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+K opens 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 when sidebar_docs_url is set.
  • Footer (.app-footer) — footer_left / footer_right rendered as raw HTML.
  • Control sidebar — a right-hand panel rendered only when control_sidebar is enabled.

Body classes driven by config

Config keyClass added
layout_fixed_sidebarlayout-fixed
layout_fixed_navbarfixed-header
layout_fixed_footerfixed-footer
sidebar_breakpoint (default lg)sidebar-expand-{breakpoint}
sidebar_minisidebar-mini
sidebar_collapsesidebar-collapse
classes_bodyappended 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.


AdminLTE 4 · Laravel port Edit on GitHub