PHPackages                             devop360-technologies/laravel-adminlte-v2 - 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. [Admin Panels](/categories/admin)
4. /
5. devop360-technologies/laravel-adminlte-v2

ActiveLibrary[Admin Panels](/categories/admin)

devop360-technologies/laravel-adminlte-v2
=========================================

Easy AdminLTE integration with Laravel

v2.2.2(5mo ago)017MITPHPPHP ^8.2

Since Nov 21Pushed 1mo agoCompare

[ Source](https://github.com/devop360-technologies/laravel-adminlte-v2)[ Packagist](https://packagist.org/packages/devop360-technologies/laravel-adminlte-v2)[ RSS](/packages/devop360-technologies-laravel-adminlte-v2/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependencies (4)Versions (5)Used By (0)

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

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

[![Latest Version on Packagist](https://camo.githubusercontent.com/4fc0c516030a7a9f4f352106be3bb6052ba2ad19420b4b1ed64d9f3cbd806f68/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6a65726f656e6e6f74656e2f4c61726176656c2d41646d696e4c54452e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/jeroennoten/Laravel-AdminLTE)[![Build Status](https://camo.githubusercontent.com/77bdc8522008d6f3fd9af0f259560c5412e1ada8f11176c279eff1c89a0e928a/68747470733a2f2f7472617669732d63692e6f72672f6a65726f656e6e6f74656e2f4c61726176656c2d41646d696e4c54452e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/jeroennoten/Laravel-AdminLTE)[![Quality Score](https://camo.githubusercontent.com/e9c90cda6951e1769497bccf346b8c777cf9053a7a25527a404d946955ecc034/68747470733a2f2f696d672e736869656c64732e696f2f7363727574696e697a65722f672f6a65726f656e6e6f74656e2f4c61726176656c2d41646d696e4c54452e7376673f7374796c653d666c61742d737175617265)](https://scrutinizer-ci.com/g/jeroennoten/Laravel-AdminLTE)[![StyleCI](https://camo.githubusercontent.com/65cbe856bc67e4e3a95b92b7ba30c54c850d818545d18d3d60ac7b497848a196/68747470733a2f2f7374796c6563692e696f2f7265706f732f33383230303433332f736869656c643f6272616e63683d6d6173746572)](https://styleci.io/repos/38200433)[![Total Downloads](https://camo.githubusercontent.com/51de72e05eef4774511f0b7456922a15a2992a871a542960cb8ebed05480a585/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6a65726f656e6e6f74656e2f4c61726176656c2d41646d696e4c54452e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/jeroennoten/Laravel-AdminLTE)

This package provides an easy way to quickly set up [AdminLTE v2](https://adminlte.io) with Laravel 10, 11, or 12. The package provides Blade templates 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.

**Dependencies**: Laravel Framework and Laravel UI (for authentication features).

> **Note**: This version has been updated to support Laravel 10+ and PHP 8.2+. For older Laravel versions, please use the original package versions.

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

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

    2. [Plugins](#62-plugins)
7. [Translations](#7-translations)
    1. [Menu Translations](#71-menu-translations)
8. [Customize views](#8-customize-views)
9. [Issues, Questions and Pull Requests](#9-issues-questions-and-pull-requests)

1. Requirements
---------------

[](#1-requirements)

- Laravel 10.x, 11.x, or 12.x
- Laravel UI 4.x (for authentication features)
- PHP &gt;= 8.2

2. Installation
---------------

[](#2-installation)

1. Require the package using composer:

    ```
    composer require devop360-technologies/laravel-adminlte-v2

    ```
2. Install AdminLTE:

    ```
    php artisan adminlte:install

    ```

3. Updating
-----------

[](#3-updating)

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

    ```
    composer update devop360-technologies/laravel-adminlte-v2

    ```
2. Then, we need to update the assets

    > If you using AdminLTE for Laravel 5.x and are upgrading Laravel 6 version, delete the folder adminlte inside your public/vendor folder.

    And then use this command to publish new assets

    ```
    php artisan vendor:publish --provider="Devop360Technologies\LaravelAdminLte\AdminLteServiceProvider" --tag=assets --force

    ```
3. If you have [published](#8-customize-views) and modified the default master, page views or login views, you will need to update them too.

    Option 1:

    - Make a copy of the views you modified.
    - Publish the views again, using ```
        php artisan vendor:publish --provider="Devop360Technologies\LaravelAdminLte\AdminLteServiceProvider" --tag=views

        ```
    - Redo the modifications you did.

    Option 2:

    - Modify in the css, js and other assets location in the master and page views.

### 3.1 Breaking Changes

[](#31-breaking-changes)

1. Version 1.25.1 to 1.26 and up:

- Plugins configuration was modified, check the new usage here: [Plugins](#62-plugins)

2. Version 1.26 to 1.27 and up:

- iCheck plugin was replaced with [icheck-bootstrap](https://github.com/bantikyan/icheck-bootstrap). If you use the iCheck assets, make sure to check/modify the asset location.

3. Laravel 6 version moved the assets file. Check the locations.

- If you modified the default views, edit then fixing the assets injection.

4. Usage
--------

[](#4-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 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.

6. Configuration
----------------

[](#6-configuration)

After the installation, you will notice a adminlte.php file in you config folder.

Use it to configure the title, skin, menu, URLs etc. All configuration options are explained in the comments.

### 6.1 Menu

[](#61-menu)

You can configure your menu as follows:

```
'menu' => [
    'MAIN NAVIGATION',
    [
        'text' => 'Blog',
        'url' => 'admin/blog',
    ],
    [
        'text' => 'Pages',
        'url' => 'admin/pages',
        'icon' => 'fas fa-fw fa-file'
    ],
    [
        'text' => 'Show my website',
        'url' => '/',
        'target' => '_blank'
    ],
    'ACCOUNT SETTINGS',
    [
        'text' => 'Profile',
        'route' => 'admin.profile',
        'icon' => 'fas fa-fw fa-user'
    ],
    [
        'text' => 'Change Password',
        'route' => 'admin.password',
        'icon' => 'fas fa-fw fa-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](https://fontawesome.com/icons/circle?style=regular&from=io) if you leave it out. The available icons that you can use are those from [Font Awesome](https://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'
    ],
]
```

#### Adding a Search Input

[](#adding-a-search-input)

It's possible to add a search input in your menu, using a menu item with the following configuration:

```
        [
            'search' => true,
            'href' => 'test',  //form action
            'method' => 'POST', //form method
            'input_name' => 'menu-search-input', //input name
            'text' => 'Search', //input placeholder
        ],
```

#### 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:

```
