Convert Figma logo to code with AI

jeroennoten logoLaravel-AdminLTE

Easy AdminLTE integration with Laravel

3,795
1,080
3,795
13

Top Related Projects

43,907

AdminLTE - Free admin dashboard template based on Bootstrap 5

2,542

Laravel UI utilities and presets.

The Laravel Boilerplate Project - https://laravel-boilerplate.com

Associate users with roles and permissions

Quick Overview

Laravel-AdminLTE is a Laravel package that integrates the AdminLTE3 template with Laravel. It provides an easy way to set up an admin panel for Laravel applications, offering a clean and modern interface with various pre-built components and layouts.

Pros

  • Easy integration with Laravel projects
  • Customizable layouts and components
  • Regular updates and active community support
  • Includes authentication views and presets

Cons

  • Limited flexibility compared to building a custom admin panel from scratch
  • Dependency on AdminLTE3 template, which may not suit all design preferences
  • Learning curve for developers unfamiliar with AdminLTE
  • May require additional customization for complex admin panel requirements

Code Examples

  1. Installing AdminLTE assets:
use JeroenNoten\LaravelAdminLte\Events\BuildingMenu;

Event::listen(BuildingMenu::class, function (BuildingMenu $event) {
    $event->menu->add([
        'text' => 'blog',
        'url'  => 'admin/blog',
    ]);
});
  1. Creating a custom menu item with icon:
[
    'text' => 'Dashboard',
    'url'  => 'admin/dashboard',
    'icon' => 'fas fa-tachometer-alt',
]
  1. Adding a dropdown menu:
[
    'text'    => 'multilevel',
    'icon'    => 'fas fa-fw fa-share',
    'submenu' => [
        [
            'text' => 'level_one',
            'url'  => '#',
        ],
        [
            'text'    => 'level_one',
            'url'     => '#',
            'submenu' => [
                [
                    'text' => 'level_two',
                    'url'  => '#',
                ],
            ],
        ],
    ],
]

Getting Started

  1. Install the package via Composer:

    composer require jeroennoten/laravel-adminlte
    
  2. Publish the configuration file:

    php artisan adminlte:install
    
  3. Configure your config/adminlte.php file to customize the admin panel.

  4. Use the provided Blade components in your views:

    @extends('adminlte::page')
    
    @section('title', 'Dashboard')
    
    @section('content_header')
        <h1>Dashboard</h1>
    @stop
    
    @section('content')
        <p>Welcome to this beautiful admin panel.</p>
    @stop
    
  5. Customize further as needed, including authentication setup and menu configuration.

Competitor Comparisons

43,907

AdminLTE - Free admin dashboard template based on Bootstrap 5

Pros of AdminLTE

  • More flexible and framework-agnostic, can be used with various backend technologies
  • Larger community and more frequent updates
  • Includes more pre-built components and plugins out of the box

Cons of AdminLTE

  • Requires more setup and integration work for Laravel projects
  • Less Laravel-specific documentation and examples
  • May require additional customization to fit Laravel best practices

Code Comparison

Laravel-AdminLTE:

use JeroenNoten\LaravelAdminLte\AdminLte;

public function index(AdminLte $adminLte)
{
    $adminLte->setTitle('Dashboard');
    return view('home');
}

AdminLTE:

<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="utf-8">
  <meta name="viewport" content="width=device-width, initial-scale=1">
  <title>AdminLTE 3 | Dashboard</title>
  <link rel="stylesheet" href="path/to/adminlte.min.css">
</head>
<body class="hold-transition sidebar-mini">
  <!-- Your content here -->
  <script src="path/to/adminlte.min.js"></script>
</body>
</html>

The Laravel-AdminLTE package provides a more integrated experience with Laravel, while AdminLTE offers greater flexibility but requires more manual setup. Laravel-AdminLTE simplifies the implementation within Laravel projects, whereas AdminLTE gives developers more control over the integration process across various frameworks and technologies.

2,542

Laravel UI utilities and presets.

Pros of Laravel UI

  • Official Laravel package, ensuring compatibility and long-term support
  • Provides basic authentication scaffolding out of the box
  • Lightweight and minimalistic, allowing for easy customization

Cons of Laravel UI

  • Limited pre-built UI components compared to Laravel-AdminLTE
  • Requires more manual styling and layout work for admin interfaces
  • Lacks advanced features like role-based access control and menu management

Code Comparison

Laravel UI (basic auth scaffolding):

php artisan ui bootstrap --auth
npm install && npm run dev

Laravel-AdminLTE (installation and basic setup):

composer require jeroennoten/laravel-adminlte
php artisan adminlte:install

Laravel UI focuses on providing a foundation for authentication, while Laravel-AdminLTE offers a more comprehensive admin panel solution with pre-built components and layouts. Laravel UI is better suited for projects requiring a minimal starting point, whereas Laravel-AdminLTE is ideal for quickly setting up feature-rich admin interfaces with less custom development needed.

The Laravel Boilerplate Project - https://laravel-boilerplate.com

Pros of Laravel Boilerplate

  • More comprehensive out-of-the-box features, including user management, role-based access control, and social authentication
  • Includes a full-featured admin panel with customizable dashboard widgets
  • Provides a more complete starting point for large-scale Laravel applications

Cons of Laravel Boilerplate

  • Steeper learning curve due to its extensive feature set
  • May include unnecessary features for smaller projects, potentially leading to bloat
  • Less flexibility in terms of frontend customization compared to Laravel-AdminLTE

Code Comparison

Laravel Boilerplate (routes/backend/admin.php):

Route::get('dashboard', [DashboardController::class, 'index'])
    ->name('dashboard')
    ->middleware('permission:view backend');

Laravel-AdminLTE (config/adminlte.php):

'menu' => [
    [
        'text' => 'Dashboard',
        'url'  => 'admin/dashboard',
        'icon' => 'fas fa-fw fa-tachometer-alt',
    ],
],

The code snippets show different approaches to defining admin routes and menus. Laravel Boilerplate uses a more structured routing system with middleware, while Laravel-AdminLTE relies on configuration arrays for menu generation.

Associate users with roles and permissions

Pros of Laravel-permission

  • Focused specifically on role-based permissions, providing a more specialized solution
  • Offers a more granular approach to permissions management
  • Integrates seamlessly with Laravel's built-in authentication system

Cons of Laravel-permission

  • Limited to permission and role management, lacking UI components
  • Requires more manual setup and configuration for a complete admin panel solution

Code Comparison

Laravel-permission:

$user->givePermissionTo('edit articles');
$user->assignRole('writer');
$user->hasPermissionTo('edit articles');

Laravel-AdminLTE:

@section('content_header')
    <h1>Dashboard</h1>
@stop

@section('content')
    <p>Welcome to this beautiful admin panel.</p>
@stop

Laravel-permission focuses on backend permission management, while Laravel-AdminLTE provides a complete admin panel UI solution. Laravel-permission offers more flexibility in defining and managing roles and permissions, but requires additional work to create a user interface. Laravel-AdminLTE, on the other hand, provides a ready-to-use admin panel with various UI components and layouts, but may require additional packages or custom code for advanced permission management.

Convert Figma logo designs to code with AI

Visual Copilot

Introducing Visual Copilot: A new AI model to turn Figma designs to high quality code using your components.

Try Visual Copilot

README

Easy AdminLTE integration with Laravel

Latest Packagist Version Total Downloads GitHub Checks Status Quality Score Code Coverage StyleCI

This package provides an easy way to quickly set up AdminLTE v3 with Laravel (7 or higher). It has no others requirements and dependencies besides Laravel, so you can start building your admin panel immediately. The package provides a blade template that you can extend and an advanced menu configuration system. Also, and optionally, the package offers a set of AdminLTE styled authentication views that you can use in replacement of the ones that are provided by the legacy laravel/ui authentication scaffolding.

If you want to use an older Laravel or AdminLTE version, review the following package releases:

  • Releases 1.x: These releases supports Laravel 5 and include AdminLTE v2
  • Releases 2.x: These releases supports Laravel 6 and include AdminLTE v2
  • Releases 3.x (<=3.8.6): These releases supports Laravel 6 and include AdminLTE v3

Documentation

All documentation is available on the Wiki Pages, we encourage you to read it. If you are new start with the Installation Guide. To update the package consult the Updating Guide.

Requirements

The current package requirements are:

  • Laravel >= 7.x
  • PHP >= 7.2.5

Issues, Questions and Pull Requests

You can report issues or ask questions in the issues section. Please, start your issue with [BUG] and your question with [QUESTION] in the subject.

You may also use the issues to propose changes for the Wiki Pages, in that case use [WIKI] at the beginning of the subject.

If you have a question, it is recommended to make a search over the closed issues first.

To submit a Pull Request, fork this repository and create a new branch to commit your new changes there. Finally, open a Pull Request from your new branch. Refer to the contribution guidelines for detailed instructions. When submitting a Pull Request take the next notes into consideration:

  • Verify that the Pull Request doesn't introduce a high downgrade on the code quality.
  • If the Pull Request adds a new feature, consider adding a proposal of the documentation for the Wiki.
  • Keep the package focused, don't add special support to other packages or to solve very particular situations. These changes will make the package harder to maintain.