Skip to content

Easy AdminLTE integration with Laravel 5.4 and laravel mix friendly.

License

Notifications You must be signed in to change notification settings

karmendra/laravel-admin-lte

 
 

Repository files navigation

Laravel AdminLTE

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.

Installation

composer require atnic/laravel-admin-lte

Add this line on config/app.php, on providers

'providers' => [
  ...
  Atnic\AdminLTE\Providers\AppServiceProvider::class,
  ...
]

And then run,

php artisan make:admin-lte

Let's see what we've install. First, make sure that you already ran php artisan migrate command, then do

php artisan serve

Viola! You've running a Laravel site using AdminLTE.

For more information on command

php artisan make:admin-lte --help

Usage

This 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>
@endsection

To 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>
@endsection

This 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 here

Configuration and Views Customization

Config

To publish this package config to your app config run

php artisan vendor:publish --provider="Atnic\AdminLTE\Providers\AppServiceProvider" --tag="config"

Views

To publish this package views so you can customize on your own run

php artisan vendor:publish --provider="Atnic\AdminLTE\Providers\AppServiceProvider" --tag="views"

Next Step

First of all, you should understand how to use Laravel Mix.

AdminLTE need some package on npm. First you need to run

npm install

Install AdminLTE needed package from npm

npm install --save-dev admin-lte fastclick font-awesome icheck slim-scroll

Run Laravel Mix command

npm run development

or use production minimize output

npm run production

Then have a good look on these files

  • webpack.mix.js
  • resources/assets/js/admin-lte.js
  • resources/assets/js/auth.js
  • resources/assets/sass/admin-lte.scss
  • resources/assets/sass/auth.scss

Happy experimenting!

About

Easy AdminLTE integration with Laravel 5.4 and laravel mix friendly.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • JavaScript 83.7%
  • CSS 15.1%
  • Other 1.2%