2017 © Pedro Peláez
 

library laravel-adminlte

Almsaeed's AdminLTE Template for Sleeping Owl's Admin Generator plugin for Laravel 5

image

gionnivaleriana/laravel-adminlte

Almsaeed's AdminLTE Template for Sleeping Owl's Admin Generator plugin for Laravel 5

  • Thursday, October 8, 2015
  • by gionnivaleriana
  • Repository
  • 9 Watchers
  • 69 Stars
  • 1,230 Installations
  • PHP
  • 1 Dependents
  • 0 Suggesters
  • 19 Forks
  • 4 Open issues
  • 6 Versions
  • 5 % Grown

The README.md

Laravel AdminLTE

Build Status Latest Stable Version Total Downloads Latest Unstable Version License HHVM Status, (*1)

An Almsaeed's AdminLTE template built for Sleeping Owl's Admin, an administrative interface builder for Laravel 5., (*2)

Installation

Step 1: Download the package

Open a command console, enter your project directory and execute the following command to download the latest stable version of this package:, (*3)

$ composer require gionnivaleriana/laravel-adminlte:dev-master

This command requires you to have Composer installed globally, as explained in the installation chapter of the Composer documentation., (*4)

Step 2: Enable the package

Then, enable the package by adding the following line in the app/config.php file of your project:, (*5)

<?php
// app/config.php

return [

    'providers' => [

        // ...

        GionniValeriana\laravelAdminlte\AdminlteServiceProvider::class

    ],

    // ...

    'aliases' => [

        // ...

        'Adminlte' => GionniValeriana\laravelAdminlte\Adminlte::class,

    ],

];

Step 3: Use the package

To use the package/template overriding the default one by Sleeping Owl, modify the following line in the app/admin.php file of your project:, (*6)

The app/admin.php file is generated during the Sleeping Owl's Admin package installation by the command admin:install., (*7)

<?php
// app/admin.php

return [

    // ...

    'bladePrefix' => 'adminlte::',

];

Then publish the assets (css, js..) to your public folder with the command, (*8)

$ php artisan vendor:publish

Add the styles and scripts in the AppServiceProvider, (*9)

<?php
// app/Providers/AppServiceProvider.php

    // ...

    public function register() {

        // ...

        config([
            'preload.styles' => [
                asset('packages/GionniValeriana/adminlte/bootstrap/css/bootstrap.min.css'),
                asset('packages/GionniValeriana/adminlte/plugins/font-awesome/font-awesome.min.css'),
                asset('packages/GionniValeriana/adminlte/plugins/ionicons/ionicons.min.css'),
                asset('packages/GionniValeriana/adminlte/dist/css/AdminLTE.min.css'),
                asset('packages/GionniValeriana/adminlte/dist/css/skins/_all-skins.min.css'),
                asset('packages/GionniValeriana/adminlte/plugins/iCheck/flat/blue.css'),
                asset('packages/GionniValeriana/adminlte/plugins/morris/morris.css'),
                asset('packages/GionniValeriana/adminlte/plugins/datatables/dataTables.bootstrap.css'),
                asset('packages/GionniValeriana/adminlte/plugins/jvectormap/jquery-jvectormap-1.2.2.css'),
                asset('packages/GionniValeriana/adminlte/plugins/datepicker/datepicker3.css'),
                asset('packages/GionniValeriana/adminlte/plugins/daterangepicker/daterangepicker-bs3.css'),
                asset('packages/GionniValeriana/adminlte/plugins/bootstrap-wysihtml5/bootstrap3-wysihtml5.min.css'),
            ],
            'preload.scripts' => [
                asset('packages/GionniValeriana/adminlte/plugins/jQuery/jQuery-2.1.3.min.js'),
                asset('packages/GionniValeriana/adminlte/bootstrap/js/bootstrap.min.js'),
                asset('packages/GionniValeriana/adminlte/plugins/input-mask/jquery.inputmask.js'),
                asset('packages/GionniValeriana/adminlte/plugins/input-mask/jquery.inputmask.date.extensions.js'),
                asset('packages/GionniValeriana/adminlte/plugins/input-mask/jquery.inputmask.extensions.js'),
                asset('packages/GionniValeriana/adminlte/plugins/moment/moment.min.js'),
                asset('packages/GionniValeriana/adminlte/plugins/daterangepicker/daterangepicker.js'),
                asset('packages/GionniValeriana/adminlte/plugins/colorpicker/bootstrap-colorpicker.min.js'),
                asset('packages/GionniValeriana/adminlte/plugins/timepicker/bootstrap-timepicker.min.js'),
                asset('packages/GionniValeriana/adminlte/plugins/datatables/jquery.dataTables.js'),
                asset('packages/GionniValeriana/adminlte/plugins/datatables/dataTables.bootstrap.js'),
                asset('packages/GionniValeriana/adminlte/plugins/slimScroll/jquery.slimscroll.min.js'),
                asset('packages/GionniValeriana/adminlte/plugins/iCheck/icheck.min.js'),
                asset('packages/GionniValeriana/adminlte/plugins/fastclick/fastclick.min.js'),
            ],
        ]);
    }

And then load that with Sleeping Owl's bootstrap script, (*10)

<?php
// app/admin/bootstrap.php

use Illuminate\Support\Facades\Config;
use SleepingOwl\Admin\AssetManager\AssetManager;

$assets = new AssetManager();

foreach (Config::get('preload.styles') as $style) {
    $assets->addStyle($style);
}

foreach (Config::get('preload.scripts') as $script) {
    $assets->addScript($script);
}

Usage

Let's start creating a "Start Page" menu item as described in Sleeping Owl's doc., (*11)

// app/admin/menu.php

Admin::menu()->url('/')
             ->label('Start Page')
             ->icon('fa-dashboard')
             ->uses('\App\HTTP\Controllers\AdminController@getIndex');

Standard blank page

To view the standard blank page from this package, in \App\HTTP\Controllers\AdminController the method AdminController::getIndex() should return this:, (*12)

// app/Http/Controllers/AdminController.php

class AdminController extends \SleepingOwl\Admin\Controllers\AdminController {

    /**
     * @return \Illuminate\View\View
     */
    public function getIndex() {
        return view('adminlte::blank');
    }

    // ...

Custom page/view

To use instead a custom view, let's create a new one in the view folder (default in resources/views), (*13)

// resources/views/customPage.blade.php

@section('innerContent')
    <section class="content-header">
        <h1>Custom Page</h1>
        <ol class="breadcrumb">
            <li class="active"><i class="fa fa-dashboard"></i> Home</li>
        </ol>
    </section>
    <section class="content">

        // ...

    </section>
@stop

Then return it in AdminController::getIndex(), (*14)

// app/Http/Controllers/AdminController.php

class AdminController extends \SleepingOwl\Admin\Controllers\AdminController {

    /**
     * @return \Illuminate\View\View
     */
    public function getIndex() {
        return view('customPage');
    }

    // ...

Requirements

Author

The Versions

08/10 2015

dev-master

9999999-dev

Almsaeed's AdminLTE Template for Sleeping Owl's Admin Generator plugin for Laravel 5

  Sources   Download

MIT

The Requires

 

The Development Requires

by Joy Lazari (gionnivaleriana)

08/10 2015

1.0.2.1

1.0.2.1

Almsaeed's AdminLTE Template for Sleeping Owl's Admin Generator plugin for Laravel 5

  Sources   Download

MIT

The Requires

 

The Development Requires

by Joy Lazari (gionnivaleriana)

08/10 2015

1.0.2

1.0.2.0

Almsaeed's AdminLTE Template for Sleeping Owl's Admin Generator plugin for Laravel 5

  Sources   Download

MIT

The Requires

 

The Development Requires

by Joy Lazari (gionnivaleriana)

07/09 2015

1.0.1

1.0.1.0

Almsaeed's AdminLTE Template for Sleeping Owl's Admin Generator plugin for Laravel 5

  Sources   Download

MIT

The Requires

 

The Development Requires

by Joy Lazari (gionnivaleriana)

06/09 2015

v1.0.0

1.0.0.0

Almsaeed's AdminLTE Template for Sleeping Owl's Admin Generator plugin for Laravel 5

  Sources   Download

MIT

The Requires

 

The Development Requires

by Joy Lazari (gionnivaleriana)

03/03 2015

v0.0.1

0.0.1.0

Almsaeed's AdminLTE Template for Sleeping Owl's Admin Generator plugin for Laravel 5

  Sources   Download

MIT

The Requires

 

The Development Requires

by Joy Lazari (gionnivaleriana)