PHPackages                             statisticlv/laravel-admin-panel - 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. statisticlv/laravel-admin-panel

ActiveLibrary[Admin Panels](/categories/admin)

statisticlv/laravel-admin-panel
===============================

A comprehensive admin panel for Laravel with authentication and content management

014BladeCI failing

Since Dec 31Pushed 4mo agoCompare

[ Source](https://github.com/NoVice1987/laravel-admin-panel)[ Packagist](https://packagist.org/packages/statisticlv/laravel-admin-panel)[ RSS](/packages/statisticlv-laravel-admin-panel/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependenciesVersions (1)Used By (0)

Laravel Admin Panel
===================

[](#laravel-admin-panel)

A comprehensive admin panel package for Laravel with authentication, content management, and frontend integration. This package provides a complete CMS solution with news management, pages, menus, settings, and a built-in frontend.

Version
-------

[](#version)

**Current Version:** 1.0.0

Features
--------

[](#features)

- 🔐 **Secure Authentication** - Separate admin authentication with role-based access control (admin, super\_admin)
- 👥 **User Management** - Super admin can manage all admin users with full CRUD operations
- 📰 **News Management** - Create, edit, publish, and archive news articles with featured images
- 📄 **Page Management** - Manage static pages with custom templates and SEO metadata
- 🗂️ **Menu Management** - Create and manage nested menu structures for different locations
- ⚙️ **Settings Management** - Dynamic settings system with grouping and type casting
- 🎨 **Frontend Integration** - Built-in frontend routes and controllers for immediate use
- 🔄 **Soft Deletes** - All main models support soft deletes for data recovery
- 🔗 **Slug Generation** - Automatic URL-friendly slug generation
- 💾 **Caching** - Built-in cache management for improved performance
- 📝 **Activity Logging** - Automatic logging of admin actions
- ✅ **Testing** - PHPUnit tests included for authentication features

Requirements
------------

[](#requirements)

- PHP 8.1 or higher
- Laravel 10.0, 11.0, or 12.0

Installation
------------

[](#installation)

### Step 1: Install via Composer

[](#step-1-install-via-composer)

```
composer require statisticlv/laravel-admin-panel
```

### Step 2: Install the Package

[](#step-2-install-the-package)

Run the installation command to publish all necessary files:

```
php artisan admin-panel:install
```

The installation command will:

- Publish configuration file to `config/admin-panel.php`
- Publish database migrations
- Publish controllers to `app/Http/Controllers/`
- Publish web routes to `routes/web.php`
- Publish views to `resources/views/`
- Publish assets to `public/vendor/admin-panel/`
- Run database migrations
- Seed settings table
- Optionally install demo data

### Step 3: Install with Demo Data (Optional)

[](#step-3-install-with-demo-data-optional)

To install with sample data for testing:

```
php artisan admin-panel:install --demo
```

Demo credentials:

- **Email:**
- **Password:** password

Configuration
-------------

[](#configuration)

After installation, you can customize the package by editing `config/admin-panel.php`:

```
return [
    // Admin panel route prefix
    'route_prefix' => 'admin',

    // Middleware applied to admin routes
    'middleware' => ['web'],

    // Enable default frontend routes
    'enable_frontend_routes' => true,

    // Authentication guard
    'guard' => 'admin',

    // Admin panel title
    'title' => 'Admin Panel',

    // Items per page in list views
    'per_page' => 15,

    // Default date format
    'date_format' => 'Y-m-d H:i:s',
];
```

Available Commands
------------------

[](#available-commands)

### Create Admin User

[](#create-admin-user)

Create a new admin user via command line:

```
php artisan admin:create-user
```

Options:

- `--name` - The name of the admin user
- `--email` - The email of the admin user
- `--password` - The password for the admin user
- `--role` - The role (admin or super\_admin, default: admin)

Example:

```
php artisan admin:create-user --name="John Doe" --email="john@example.com" --password="SecurePass123" --role="super_admin"
```

Database Tables
---------------

[](#database-tables)

The package creates the following tables:

- `admin_users` - Admin user accounts with roles and status
- `news` - News articles with status, author, and view counts
- `pages` - Static pages with templates and SEO metadata
- `menus` - Menu definitions with locations
- `menu_items` - Individual menu items with support for nesting
- `settings` - Dynamic key-value settings with grouping

Models
------

[](#models)

### AdminUser

[](#adminuser)

Admin user model with role-based access control.

```
use StatisticLv\AdminPanel\Models\AdminUser;

// Check if user is super admin
$user->isSuperAdmin(); // bool

// Check if user is admin (regular or super)
$user->isAdmin(); // bool

// Get news articles by author
$user->news;
```

### News

[](#news)

News article model with publishing workflow.

```
use StatisticLv\AdminPanel\Models\News;

// Get published news
$publishedNews = News::published()->get();

// Get draft news
$draftNews = News::draft()->get();

// Check if published
$news->isPublished(); // bool

// Increment view count
$news->incrementViews();
```

### Page

[](#page)

Page model with SEO support.

```
use StatisticLv\AdminPanel\Models\Page;

// Get published pages
$pages = Page::published()->get();

// Get meta title (falls back to title)
$page->meta_title;

// Get meta description (falls back to excerpt)
$page->meta_description;
```

### Menu &amp; MenuItem

[](#menu--menuitem)

Menu management with nested structure.

```
use StatisticLv\AdminPanel\Models\Menu;

$menu = Menu::where('slug', 'main')->first();

// Get root items only
$items = $menu->items;

// Get all items including nested
$allItems = $menu->allItems;
```

### Setting

[](#setting)

Dynamic settings management.

```
use StatisticLv\AdminPanel\Models\Setting;

// Get a setting value
$value = Setting::getValue('site_name', 'Default Name');

// Set a setting value
Setting::setValue('site_name', 'My Site');

// Get all settings grouped
$groupedSettings = Setting::getAllGrouped();

// Get all settings as array
$settingsArray = Setting::getAllAsArray();
```

Helper Functions
----------------

[](#helper-functions)

The package provides global helper functions for easy access to data:

### Menu Helpers

[](#menu-helpers)

```
// Get a menu by identifier
$menu = admin_menu('main');

// Render a menu as HTML
echo admin_render_menu('main', 'slug', ['class' => 'nav-menu']);
```

### News Helpers

[](#news-helpers)

```
// Get published news
$news = admin_news($limit = 10, $paginate = 15);

// Get news by slug
$article = admin_news_by_slug('my-article');

// Get latest news
$latest = admin_latest_news(5);

// Get popular news
$popular = admin_popular_news(5);
```

### Page Helpers

[](#page-helpers)

```
// Get page by slug
$page = admin_page_by_slug('about-us');

// Get all published pages
$pages = admin_pages($limit = 10);
```

### Utility Helpers

[](#utility-helpers)

```
// Format date
$formattedDate = admin_format_date($date, 'Y-m-d');

// Truncate text
$truncated = admin_truncate($text, 100, '...');

// Get excerpt from HTML
$excerpt = admin_excerpt($htmlContent, 200);
```

Routes
------

[](#routes)

### Admin Routes (Prefix: /admin)

[](#admin-routes-prefix-admin)

- `GET /admin/login` - Login page
- `POST /admin/login` - Login action
- `POST /admin/logout` - Logout action
- `GET /admin` - Dashboard
- `GET /admin/dashboard` - Dashboard
- `GET|POST|PUT|DELETE /admin/news` - News management (CRUD)
- `GET|POST|PUT|DELETE /admin/pages` - Page management (CRUD)
- `GET|POST|PUT|DELETE /admin/menus` - Menu management (CRUD)
- `POST /admin/menus/{menu}/items` - Add menu item
- `PUT /admin/menus/{menu}/items/{item}` - Update menu item
- `DELETE /admin/menus/{menu}/items/{item}` - Delete menu item
- `GET|POST|PUT|DELETE /admin/settings` - Settings management
- `GET|POST|PUT|DELETE /admin/users` - User management (CRUD, Super Admin only)
- `POST /admin/users/{user}/restore` - Restore soft-deleted user (Super Admin only)
- `DELETE /admin/users/{user}/force-delete` - Permanently delete user (Super Admin only)

### Frontend Routes

[](#frontend-routes)

- `GET /` - Homepage
- `GET /news` - News listing
- `GET /news/{slug}` - Single news article
- `GET /{slug}` - Page (catch-all route)

Authentication
--------------

[](#authentication)

The package uses a separate authentication guard for admin users:

```
// Authenticate admin user
if (Auth::guard('admin')->attempt($credentials)) {
    // Success
}

// Get authenticated admin user
$admin = Auth::guard('admin')->user();

// Check authentication
if (Auth::guard('admin')->check()) {
    // User is authenticated
}
```

### Roles

[](#roles)

Two roles are available:

- `admin` - Regular admin with standard permissions (news, pages, menus, settings)
- `super_admin` - Super admin with full permissions including user management

### Middleware

[](#middleware)

The package includes the following middleware:

- `admin.auth` - Authentication middleware for admin routes
- `super.admin` - Authorization middleware for super admin only routes

```
// Protect admin routes (requires authentication)
Route::middleware(['admin.auth'])->group(function () {
    // Protected admin routes
});

// Protect super admin routes (requires super admin role)
Route::middleware(['super.admin'])->group(function () {
    // Super admin only routes (e.g., user management)
});
```

Views
-----

[](#views)

The package publishes views to `resources/views/`:

- `auth/login.blade.php` - Admin login page
- `dashboard/index.blade.php` - Admin dashboard
- `news/index.blade.php` - News listing
- `news/create.blade.php` - Create news form
- `news/edit.blade.php` - Edit news form
- `pages/index.blade.php` - Pages listing
- `pages/create.blade.php` - Create page form
- `pages/edit.blade.php` - Edit page form
- `menus/index.blade.php` - Menus listing
- `menus/create.blade.php` - Create menu form
- `menus/edit.blade.php` - Edit menu form
- `users/index.blade.php` - Users listing (Super Admin only)
- `users/create.blade.php` - Create user form (Super Admin only)
- `users/edit.blade.php` - Edit user form (Super Admin only)
- `users/show.blade.php` - User details view (Super Admin only)
- `settings/index.blade.php` - Settings listing
- `settings/edit.blade.php` - Edit settings form
- `frontend/home.blade.php` - Homepage
- `frontend/news/index.blade.php` - News listing (frontend)
- `frontend/news/show.blade.php` - Single news article (frontend)
- `frontend/pages/default.blade.php` - Default page template (frontend)
- `layouts/app.blade.php` - Admin layout
- `frontend/layouts/app.blade.php` - Frontend layout

Customization
-------------

[](#customization)

### Customizing Controllers

[](#customizing-controllers)

After installation, controllers are published to `app/Http/Controllers/`. You can modify them to add custom logic:

```
// app/Http/Controllers/NewsController.php

namespace App\Http\Controllers;

use StatisticLv\AdminPanel\Models\News;

class NewsController extends \StatisticLv\AdminPanel\Http\Controllers\NewsController
{
    // Override methods or add new ones
}
```

### Customizing Views

[](#customizing-views)

All views are published to `resources/views/` and can be customized as needed.

### Customizing Routes

[](#customizing-routes)

The web routes file is published to `routes/web.php`. You can modify routes or add new ones.

Testing
-------

[](#testing)

Run the included tests:

```
php artisan test
```

Tests cover:

- Admin authentication
- Login validation
- Rate limiting
- Authorization checks
- Session management

Security
--------

[](#security)

- Password strength validation (minimum 8 characters, uppercase, lowercase, number)
- Rate limiting on login attempts
- Role-based access control (admin and super\_admin roles)
- Super admin exclusive routes for sensitive operations
- Self-protection (admins cannot delete/deactivate themselves)
- CSRF protection
- SQL injection protection via Eloquent ORM

Performance
-----------

[](#performance)

- Database indexing on frequently queried columns
- Soft deletes for data recovery
- Caching support for news articles
- Optimized queries with eager loading

Support
-------

[](#support)

- **Issues:**
- **Source:**
- **Documentation:**

License
-------

[](#license)

This package is open-source software licensed under the [MIT License](LICENSE).

Credits
-------

[](#credits)

- **Developer:** StatisticLv
- **Email:**
- **Website:**

Contributing
------------

[](#contributing)

Contributions are welcome! Please feel free to submit a Pull Request.

Changelog
---------

[](#changelog)

See [CHANGELOG.md](CHANGELOG.md) for version history and changes.

###  Health Score

19

—

LowBetter than 10% of packages

Maintenance51

Moderate activity, may be stable

Popularity6

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity12

Early-stage or recently created project

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

### Community

Maintainers

![](https://www.gravatar.com/avatar/b4d44940e0a4f23cf71a833614cec12726255427c250da8fb8e9f4f5deb865ee?d=identicon)[HoBu4eK](/maintainers/HoBu4eK)

---

Top Contributors

[![HoBu4eK](https://avatars.githubusercontent.com/u/18058179?v=4)](https://github.com/HoBu4eK "HoBu4eK (16 commits)")

### Embed Badge

![Health badge](/badges/statisticlv-laravel-admin-panel/health.svg)

```
[![Health](https://phpackages.com/badges/statisticlv-laravel-admin-panel/health.svg)](https://phpackages.com/packages/statisticlv-laravel-admin-panel)
```

###  Alternatives

[jeroennoten/laravel-adminlte

Easy AdminLTE integration with Laravel

4.0k4.8M43](/packages/jeroennoten-laravel-adminlte)[dmstr/yii2-adminlte-asset

AdminLTE backend theme asset bundle for Yii 2.0 Framework

1.1k1.8M67](/packages/dmstr-yii2-adminlte-asset)[dwij/laraadmin

LaraAdmin is a Open source Laravel Admin Panel / CMS which can be used as Admin Backend, Data Management Tool or CRM boilerplate for Laravel with features like CRUD Generation, Module Manager, Media, Menus, Backups and much more

1.6k68.7k](/packages/dwij-laraadmin)[filament/spatie-laravel-media-library-plugin

Filament support for `spatie/laravel-medialibrary`.

1764.8M125](/packages/filament-spatie-laravel-media-library-plugin)[bezhansalleh/filament-exceptions

A Simple &amp; Beautiful Pluggable Exception Viewer for FilamentPHP's Admin Panel

193195.9k13](/packages/bezhansalleh-filament-exceptions)[filament/infolists

Easily add beautiful read-only infolists to any Livewire component.

1220.8M36](/packages/filament-infolists)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
