rob-lester-jr04/laravel-admin-lte

Laravel Package for integrating AdminLTE template and this package is Laravel Mix friendly.

Fund package maintenance!
Patreon

Installs: 40

Dependents: 0

Suggesters: 0

Security: 0

Stars: 0

Watchers: 0

Forks: 8

Language:Blade

Type:package

v0.5.1 2018-05-23 17:09 UTC

This package is auto-updated.

Last update: 2024-12-24 01:03:56 UTC


README

Latest Stable Version Total Downloads Latest Unstable Version License Monthly Downloads Daily Downloads

Laravel Package for integrating AdminLTE template and this package is Laravel Mix friendly. Currently this package can be integrated easily only on fresh installation.

For translation in Bahasa Indonesia 🇮🇩, please follow this link

Installation

composer require atnic/laravel-admin-lte

If you are using Laravel 5.5 above skip this step, but if aren't then 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.

Make sure package.json has "laravel-mix": "^2.0".

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@^2.4 bootstrap-sass fastclick font-awesome icheck ionicons jquery jquery-slimscroll

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!