Laravel 5.4 Package for integrating AdminLTE template and this package is Laravel Mix friendly. Currently this package can be integrated easily only on fresh installation.
composer require atnic/laravel-admin-lteAdd this line on config/app.php, on providers
'providers' => [
...
Atnic\AdminLTE\Providers\AppServiceProvider::class,
...
]And then run,
php artisan make:admin-lteLet's see what we've install. First, make sure that you already ran php artisan migrate command, then do
php artisan serveViola! You've running a Laravel site using AdminLTE.
For more information on command
php artisan make:admin-lte --helpThis package provides view for auth and app. Take a look at resources/views/layouts/app.blade.php.
In this file you can extends global section like user name, avatar, breadcrumbs, and menu.
To extends menu add this in app.blade.php
@section('sidebar-menu')
<ul class="sidebar-menu">
<li class="header">MAIN NAVIGATOR</li>
<li class="active">
<a href="{{ route('home') }}">
<i class="fa fa-home"></i>
<span>Home</span>
</a>
</li>
</ul>
@endsectionTo extends breadcrumbs add this
@section('breadcrumbs')
<ol class="breadcrumb">
<li><a href="#"><i class="fa fa-dashboard"></i> Home</a></li>
<li class="active">Title</li>
</ol>
@endsectionThis package give you free of choice to use any Laravel Package for Menu and Breadcrumb. We recommend spatie/laravel-menu or lavary/laravel-menu, and davejamesmiller/laravel-breadcrumbs.
Any new created page should extends this view.
@extends('layouts.app')
// Your blade hereTo publish this package config to your app config run
php artisan vendor:publish --provider="Atnic\AdminLTE\Providers\AppServiceProvider" --tag="config"To publish this package views so you can customize on your own run
php artisan vendor:publish --provider="Atnic\AdminLTE\Providers\AppServiceProvider" --tag="views"First of all, you should understand how to use Laravel Mix.
AdminLTE need some package on npm. First you need to run
npm installInstall AdminLTE needed package from npm
npm install --save-dev admin-lte fastclick font-awesome icheck slim-scrollRun Laravel Mix command
npm run developmentor use production minimize output
npm run productionThen have a good look on these files
webpack.mix.jsresources/assets/js/admin-lte.jsresources/assets/js/auth.jsresources/assets/sass/admin-lte.scssresources/assets/sass/auth.scss
Happy experimenting!