PHPackages                             gluttm/laravel-adminlte - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. gluttm/laravel-adminlte

ActiveLibrary

gluttm/laravel-adminlte
=======================

Easy AdminLTE integration with Laravel, from GluTtm, just adpted form my needs

0148PHPCI failing

Since Sep 28Pushed 5y ago1 watchersCompare

[ Source](https://github.com/gluttm/laravel-adminlte)[ Packagist](https://packagist.org/packages/gluttm/laravel-adminlte)[ RSS](/packages/gluttm-laravel-adminlte/feed)WikiDiscussions master Synced today

READMEChangelogDependenciesVersions (1)Used By (0)

Please Access the Original , i just adapted to fill my needs,,,

Easy AdminLTE integration with Laravel 5
========================================

[](#easy-adminlte-integration-with-laravel-5)

[![Latest Version on Packagist](https://camo.githubusercontent.com/4616fd4a1a57ff4a9ffb604d3f254ee9e599dc55104554ac593745847f4e04bd/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f476c7554746d2f4c61726176656c2d41646d696e4c54452e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/GluTtm/Laravel-AdminLTE)[![Build Status](https://camo.githubusercontent.com/738ee0b81002e4bff2bacc31616f34ae19f32647605542505cb66b3e2e46d970/68747470733a2f2f7472617669732d63692e6f72672f476c7554746d2f4c61726176656c2d41646d696e4c54452e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/GluTtm/Laravel-AdminLTE)[![Quality Score](https://camo.githubusercontent.com/4157ec5804c9d902e70af7b85fee9b2796f4888fd5eb40b396337fb1a3de20e6/68747470733a2f2f696d672e736869656c64732e696f2f7363727574696e697a65722f672f476c7554746d2f4c61726176656c2d41646d696e4c54452e7376673f7374796c653d666c61742d737175617265)](https://scrutinizer-ci.com/g/GluTtm/Laravel-AdminLTE)[![StyleCI](https://camo.githubusercontent.com/65cbe856bc67e4e3a95b92b7ba30c54c850d818545d18d3d60ac7b497848a196/68747470733a2f2f7374796c6563692e696f2f7265706f732f33383230303433332f736869656c643f6272616e63683d6d6173746572)](https://styleci.io/repos/38200433)[![Total Downloads](https://camo.githubusercontent.com/f8a8c09725dbc4bc8a75b2a98f0cc3163e6e91e5bc0e41b4ef8d0b1254a283a3/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f476c7554746d2f4c61726176656c2d41646d696e4c54452e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/GluTtm/Laravel-AdminLTE)

This package provides an easy way to quickly set up [AdminLTE](https://almsaeedstudio.com) with Laravel 5. It has no requirements and dependencies besides Laravel, so you can start building your admin panel immediately. The package just provides a Blade template that you can extend and advanced menu configuration possibilities. A replacement for the `make:auth` Artisan command that uses AdminLTE styled views instead of the default Laravel ones is also included.

1. [Installation](#1-installation)
2. [Updating](#2-updating)
3. [Usage](#3-usage)
4. [The `make:adminlte` artisan command](#4-the-makeadminlte-artisan-command)
    1. [Using the authentication views without the `make:adminlte` command](#41-using-the-authentication-views-without-the-makeadminlte-command)
5. [Configuration](#5-configuration)
    1. [Menu](#51-menu)

    - [Custom menu filters](#custom-menu-filters)
    - [Menu configuration at runtime](#menu-configuration-at-runtime)
    - [Active menu items](#active-menu-items)

    2. [Plugins](#52-plugins)
6. [Translations](#6-translations)
7. [Customize views](#7-customize-views)
8. [Issues, Questions and Pull Requests](#8-issues-questions-and-pull-requests)

1. Installation
---------------

[](#1-installation)

1. Require the package using composer:

    ```
    composer require GluTtm/laravel-adminlte

    ```
2. Add the service provider to the `providers` in `config/app.php`:

    > Laravel 5.5 uses Package Auto-Discovery, so doesn't require you to manually add the ServiceProvider

    ```
    GluTtm\LaravelAdminLte\ServiceProvider::class,
    ```
3. Publish the public assets:

    ```
    php artisan vendor:publish --provider="GluTtm\LaravelAdminLte\ServiceProvider" --tag=assets

    ```

2. Updating
-----------

[](#2-updating)

1. To update this package, first update the composer package:

    ```
    composer update GluTtm/laravel-adminlte

    ```
2. Then, publish the public assets with the `--force` flag to overwrite existing files

    ```
    php artisan vendor:publish --provider="GluTtm\LaravelAdminLte\ServiceProvider" --tag=assets --force

    ```

3. Usage
--------

[](#3-usage)

To use the template, create a blade file and extend the layout with `@extends('adminlte::page')`. This template yields the following sections:

- `title`: for in the `` tag
- `content_header`: title of the page, above the content
- `content`: all of the page's content
- `css`: extra stylesheets (located in ``)
- `js`: extra javascript (just before ``)

All sections are in fact optional. Your blade template could look like the following.

```
{{-- resources/views/admin/dashboard.blade.php --}}

@extends('adminlte::page')

@section('title', 'Dashboard')

@section('content_header')
    Dashboard
@stop

@section('content')
    Welcome to this beautiful admin panel.
@stop

@section('css')

@stop

@section('js')
     console.log('Hi!');
@stop
```

Note that in Laravel 5.2 or higher you can also use `@stack` directive for `css` and `javascript`:

```
{{-- resources/views/admin/dashboard.blade.php --}}

@push('css')

@push('js')
```

You now just return this view from your controller, as usual. Check out [AdminLTE](https://almsaeedstudio.com) to find out how to build beautiful content for your admin panel.

4. The `make:adminlte` artisan command
--------------------------------------

[](#4-the-makeadminlte-artisan-command)

> Note: only for Laravel 5.2 and higher

This package ships with a `make:adminlte` command that behaves exactly like `make:auth` (introduced in Laravel 5.2) but replaces the authentication views with AdminLTE style views.

```
php artisan make:adminlte

```

This command should be used on fresh applications, just like the `make:auth` command

### 4.1 Using the authentication views without the `make:adminlte` command

[](#41-using-the-authentication-views-without-the-makeadminlte-command)

If you want to use the included authentication related views manually, you can create the following files and only add one line to each file:

- `resources/views/auth/login.blade.php`:

```
@extends('adminlte::login')

```

- `resources/views/auth/register.blade.php`

```
@extends('adminlte::register')

```

- `resources/views/auth/passwords/email.blade.php`

```
@extends('adminlte::passwords.email')

```

- `resources/views/auth/passwords/reset.blade.php`

```
@extends('adminlte::passwords.reset')

```

By default, the login form contains a link to the registration form. If you don't want a registration form, set the `register_url` setting to `null` and the link will not be displayed.

5. Configuration
----------------

[](#5-configuration)

First, publish the configuration file:

```
php artisan vendor:publish --provider="GluTtm\LaravelAdminLte\ServiceProvider" --tag=config

```

Now, edit `config/adminlte.php` to configure the title, skin, menu, URLs etc. All configuration options are explained in the comments. However, I want to shed some light on the `menu` configuration.

### 5.1 Menu

[](#51-menu)

You can configure your menu as follows:

```
'menu' => [
    'MAIN NAVIGATION',
    [
        'text' => 'Blog',
        'url' => 'admin/blog',
    ],
    [
        'text' => 'Pages',
        'url' => 'admin/pages',
        'icon' => 'file'
    ],
    [
        'text' => 'Show my website',
        'url' => '/',
        'target' => '_blank'
    ],
    'ACCOUNT SETTINGS',
    [
        'text' => 'Profile',
        'route' => 'admin.profile',
        'icon' => 'user'
    ],
    [
        'text' => 'Change Password',
        'route' => 'admin.password',
        'icon' => 'lock'
    ],
],
```

With a single string, you specify a menu header item to separate the items. With an array, you specify a menu item. `text` and `url` or `route` are required attributes. The `icon` is optional, you get an [open circle](http://fontawesome.io/icon/circle-o/) if you leave it out. The available icons that you can use are those from [Font Awesome](http://fontawesome.io/icons/). Just specify the name of the icon and it will appear in front of your menu item.

Use the `can` option if you want conditionally show the menu item. This integrates with Laravel's `Gate` functionality. If you need to conditionally show headers as well, you need to wrap it in an array like other menu items, using the `header` option:

```
[
    [
        'header' => 'BLOG',
        'can' => 'manage-blog'
    ],
    [
        'text' => 'Add new post',
        'url' => 'admin/blog/new',
        'can' => 'add-blog-post'
    ],
]
```

#### Custom Menu Filters

[](#custom-menu-filters)

If you need custom filters, you can easily add your own menu filters to this package. This can be useful when you are using a third-party package for authorization (instead of Laravel's `Gate` functionality).

For example with Laratrust:

```
