Install via Composer
composer require almasaeed2010/adminlte
AdminLTEServiceProvider) and facades (AdminLTE) for easy integration.Publish Assets (Optional but Recommended)
php artisan vendor:publish --provider="Almasaeed2010\AdminLte\AdminLTEServiceProvider" --tag=public
php artisan vendor:publish --provider="Almasaeed2010\AdminLte\AdminLTEServiceProvider" --tag=views
public/vendor/adminlte/ and Blade templates to resources/views/vendor/adminlte/.Basic Blade Integration
@extends('adminlte::page')
@section('title', 'Dashboard')
@section('content_header')
<h1>Dashboard</h1>
@stop
@section('content')
<p>Welcome to AdminLTE!</p>
@stop
title, content_header, content, etc.Load AdminLTE in Your Layout
In resources/views/layouts/app.blade.php:
@include('adminlte::partials.head-top')
@include('adminlte::partials.head')
@include('adminlte::partials.navbar')
@include('adminlte::partials.sidebar')
@include('adminlte::partials.content-wrapper')
@include('adminlte::partials.footer')
@include('adminlte::partials.control-sidebar')
@include('adminlte::partials.footer-scripts')
@section('adminlte_css')
<link rel="stylesheet" href="/custom.css">
@stop
@section('adminlte_js')
<script src="/custom.js"></script>
@stop
@section('adminlte-sidebar')
@include('adminlte::partials.sidebar', ['active' => 'dashboard'])
@stop
@include('adminlte::widgets.box', [
'title' => 'Quick Stats',
'body' => '<p>Box content here.</p>',
'type' => 'info', // primary, success, warning, danger, etc.
])
AdminLTE\Widgets\Box or use raw Bootstrap 5 components.@include('adminlte::partials.sidebar', [
'items' => [
['url' => '/dashboard', 'text' => 'Dashboard', 'icon' => 'fas fa-tachometer-alt'],
['url' => '/users', 'text' => 'Users', 'icon' => 'fas fa-users'],
],
])
@include('adminlte::partials.sidebar-item-dropdown', [
'text' => 'Reports',
'items' => [
['url' => '/reports/sales', 'text' => 'Sales'],
['url' => '/reports/analytics', 'text' => 'Analytics'],
],
])
@include('adminlte::modal', [
'id' => 'exampleModal',
'title' => 'Modal Title',
'body' => '<p>Modal content here.</p>',
'footer' => '<button class="btn btn-primary">OK</button>',
])
@include('adminlte::alert', [
'type' => 'success',
'message' => 'Operation completed!',
])
resources/views/auth/login.blade.php to use AdminLTE’s login template:
@extends('adminlte::auth.login')
@section('login_title', 'Admin Login')
@include('adminlte::partials.head-top', ['skin' => 'blue'])
blue, black, purple, yellow, green, red, gray.Asset Paths
vendor/almasaeed2010/adminlte/dist/ to public/vendor/adminlte/.public/ is writable.Blade Section Conflicts
title, content).JQuery Dependency
<script src="https://code.jquery.com/jquery-3.6.min.js"></script>
@include('adminlte::partials.head-scripts')
Sidebar Collapse Issues
data-widget="push" in the sidebar.php artisan view:clear
php artisan cache:clear
!important in custom CSS or conflicting Bootstrap versions.Custom Templates
Override any published Blade file (e.g., resources/views/vendor/adminlte/partials/sidebar.blade.php).
Dynamic Configuration
Use the AdminLTE facade to modify settings:
AdminLTE::setSkin('purple');
AdminLTE::setLayout('topnav'); // Alternative layouts: 'sidebar-mini', 'layout-boxed'
Plugin Integration AdminLTE supports DataTables, Chart.js, etc. Load plugins via:
@section('adminlte_js')
<script src="https://cdn.datatables.net/1.11.5/js/jquery.dataTables.min.js"></script>
@stop
Dark Mode Enable via:
@include('adminlte::partials.head-top', ['dark_mode' => true])
<script src="{{ asset('vendor/adminlte/dist/js/adminlte.min.js') }}" defer></script>
Sass Integration
Compile AdminLTE’s SCSS from vendor/almasaeed2010/adminlte/scss/ into your project’s assets.
Webpack Aliases
For local development, alias AdminLTE paths in webpack.mix.js:
mix.webpackConfig({
resolve: {
alias: {
'adminlte': path.resolve(__dirname, 'vendor/almasaeed2010/adminlte'),
},
},
});
How can I help you explore Laravel packages today?