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

ActiveLibrary[Admin Panels](/categories/admin)

cyd622/laravel-admin
====================

Laravel Admin

v1.0.3(8y ago)015MITPHPPHP &gt;=5.6.4

Since Jun 20Pushed 8y agoCompare

[ Source](https://github.com/cyd622/Laravel-Admin)[ Packagist](https://packagist.org/packages/cyd622/laravel-admin)[ Docs](https://github.com/cyd622/Laravel-Admin)[ RSS](/packages/cyd622-laravel-admin/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (2)Dependencies (8)Versions (5)Used By (0)

laravel-admin
=============

[](#laravel-admin)

[![Build Status](https://camo.githubusercontent.com/3fd2300392e0266fdfa6b4b0e0e52c25240ecda6a26395fd99f58dcf4d9745f5/68747470733a2f2f7472617669732d63692e6f72672f7a2d736f6e672f6c61726176656c2d61646d696e2e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/z-song/laravel-admin)[![StyleCI](https://camo.githubusercontent.com/a884703496d92dbe83d1105d4d51d9d64b48aa6b75c65b5f7487c67fa43d3bc7/68747470733a2f2f7374796c6563692e696f2f7265706f732f34383739363137392f736869656c64)](https://styleci.io/repos/48796179)[![Scrutinizer Code Quality](https://camo.githubusercontent.com/a711e17693a2ea5f7e522e8bcd326075b6c9f85cd132c2d5248bf7bcb1984acf/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f7a2d736f6e672f6c61726176656c2d61646d696e2f6261646765732f7175616c6974792d73636f72652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/z-song/laravel-admin/?branch=master)[![Packagist](https://camo.githubusercontent.com/d4ff71f8211d95aa1a9acdb9f4ab84d12061332b4ff68b913fca8834b29e66f8/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f6c2f656e636f72652f6c61726176656c2d61646d696e2e7376673f6d61784167653d32353932303030)](https://packagist.org/packages/encore/laravel-admin)[![Total Downloads](https://camo.githubusercontent.com/1a6d8373e4616160cbe4b85b964047c7aea98a51c0dace718e6b166b354a9cdd/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f656e636f72652f6c61726176656c2d61646d696e2e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/encore/laravel-admin)

`laravel-admin` 是一个可以快速帮你构建后台管理的工具，它提供的页面组件和表单元素等功能，能帮助你使用很少的代码就实现功能完善的后台管理功能。

[Demo](http://120.26.143.106/admin) 账号/密码:admin/admin

Inspired by [SleepingOwlAdmin](https://github.com/sleeping-owl/admin) and [rapyd-laravel](https://github.com/zofe/rapyd-laravel).

[英文文档](/docs/en/README.md)

安装
--

[](#安装)

首先确保安装好了`laravel5.4`，并且数据库连接设置正确。

```
仅支持 Laravel 5.4
composer require cyd622/laravel-admin "dev-master"

```

在`config/app.php`加入`ServiceProvider`:

```
Encore\Admin\Providers\AdminServiceProvider::class

```

然后运行下面的命令完成安装：

```
php artisan vendor:publish --tag=laravel-admin
php artisan admin:install

```

启动服务后，在浏览器打开 `http://localhost/admin/` ,使用用户名 `admin` 和密码 `admin`登陆.

默认配置
----

[](#默认配置)

安装完成之后，`laravel-admin`所有的配置都在`config/admin.php`文件中。

存储配置
----

[](#存储配置)

本地上传 先添加存储配置，config/filesystems.php 添加一项disk:

```

'disks' => [
    ... ,

    'admin' => [
        'driver' => 'local',
        'root' => public_path('upload'),
        'visibility' => 'public',
    ],
],

```

设置上传的路径为`public/upload` (public\_path('upload'))。

然后选择上传的disk，打开`config/admin.php`找到：

```

'upload'  => [

    'disk' => 'admin',

    'directory'  => [
        'image'  => 'image',
        'file'   => 'file',
    ],

    'host' => 'http://localhost:8000/upload/',
],

```

将disk设置为上面添加的admin，`directory.image`和`directory.file`分别为用$form-&gt;image($column)和$form-&gt;file($column)上传的图片和文件的上传目录

`host`为图片和文件的网络访问url前缀。

云盘上传 如果需要上传到云存储，需要安装对应laravel storage的适配器，拿七牛云存储举例

首先安装 `zgldh/qiniu-laravel-storage`

同样配置好disk，在`config/filesystems.php` 添加一项:

```

'disks' => [
    ... ,
    'qiniu' => [
        'driver'  => 'qiniu',
        'domains' => [
            'default'   => 'xxxxx.com1.z0.glb.clouddn.com', //你的七牛域名
            'https'     => 'dn-yourdomain.qbox.me',         //你的HTTPS域名
            'custom'    => 'static.abc.com',                //你的自定义域名
         ],
        'access_key'=> '',  //AccessKey
        'secret_key'=> '',  //SecretKey
        'bucket'    => '',  //Bucket名字
        'notify_url'=> '',  //持久化处理回调地址
    ],
],

```

然后修改Laravel-Admin的上传配置，打开`config/admin.php`找到：

```

'upload'  => [

    'disk' => 'qiniu',

    'directory'  => [
        'image'  => 'image',
        'file'   => 'file',
    ],

    'host' => 'http://of8kfibjo.bkt.clouddn.com/',
],

```

disk选择上面配置的`qiniu`，`host`配置为七牛云存储的测试域名。

使用文档
----

[](#使用文档)

- [快速开始](/docs/zh/quick-start.md)
- [路由配置](/docs/zh/router.md)
- [菜单配置](/docs/zh/menu.md)
- [显示布局](/docs/zh/layout.md)
- [数据模型表格](/docs/zh/model-grid.md)
- [数据模型表单](/docs/zh/model-form.md)
    - [图片/文件上传](/docs/zh/form-upload.md)
    - [form组件管理](/docs/zh/field-management.md)
- [组件](/docs/zh/widgets/table.md)
    - [表格](/docs/zh/widgets/table.md)
    - [表单](/docs/zh/widgets/form.md)
    - [盒子](/docs/zh/widgets/box.md)
    - [信息盒子](/docs/zh/widgets/info-box.md)
    - [选项卡](/docs/zh/widgets/tab.md)
    - [滑动相册](/docs/zh/widgets/carousel.md)
    - [折叠容器](/docs/zh/widgets/collapse.md)
    - 数据图表 TODO
- [权限控制](/docs/zh/permission.md)

目录结构
----

[](#目录结构)

安装完成之后，后台的安装目录为`app/Admin`，之后大部分的后台开发编码工作都是在这个目录下进行。

```
app/Admin
├── Controllers
│   ├── ExampleController.php
│   └── HomeController.php
└── routes.php

```

`app/Admin/routes.php`文件用来配置后台路由，详细使用请阅读[路由配置](/docs/zh/router.md)。

`app/Admin/Controllers`目录用来存放后台路由器文件，该目录下的`HomeController.php`文件是后台首页的显示控制器，`ExampleController.php`为实例文件。

快速开始
----

[](#快速开始)

用`Laravel`自带的`users`表举例,表结构为：

```
CREATE TABLE `users` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `name` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `email` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `password` varchar(60) COLLATE utf8_unicode_ci NOT NULL,
  `remember_token` varchar(100) COLLATE utf8_unicode_ci DEFAULT NULL,
  `created_at` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
  `updated_at` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
  PRIMARY KEY (`id`),
  UNIQUE KEY `users_email_unique` (`email`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci
```

对应的数据模型为文件 `App\User.php`

`laravel-admin`可以通过使用以下几步来快速生成`users`表的`CURD`操作页面：

### 1.添加路由器

[](#1添加路由器)

使用下面的命令来创建一个对应`App\User`模型的路由器

```
php artisan admin:make UserController --model=App\\User
```

上面的命令会创建路由器文件`app/Admin/Controllers/UserController.php`.

### 2.添加路由配置

[](#2添加路由配置)

在`laravel-admin`的路由配置文件`app/Admin/routes.php`里添加一行：

```
$router->resource('users', UserController::class);

```

### 3.添加左侧菜单栏连接

[](#3添加左侧菜单栏连接)

打开`http://localhost:8000/admin/auth/menu`,添加对应的menu

然后就能在后台管理页面的左侧边栏看到用户管理页面的链接入口了。

### 4.创建表格表单

[](#4创建表格表单)

剩下的工作就是构建数据表格和表单了，打开 `app/Admin/Contollers/UserController.php`,找到`form()`和`grid()`方法，然添加构建代码,更多详细使用请查看[model-grid](/docs/zh/model-grid.md)和[model-form](/docs/zh/model-form.md)。

其它
--

[](#其它)

`laravel-admin` 基于以下组件或者服务:

- [Laravel](https://laravel.com/)
- [AdminLTE](https://almsaeedstudio.com/)
- [Datetimepicker](http://eonasdan.github.io/bootstrap-datetimepicker/)
- [CodeMirror](https://codemirror.net/)
- [font-awesome](http://fontawesome.io)
- [moment](http://momentjs.com/)
- [Google map](https://www.google.com/maps)
- [Tencent map](http://lbs.qq.com/)
- [bootstrap-fileinput](https://github.com/kartik-v/bootstrap-fileinput)
- [jquery-pjax](https://github.com/defunkt/jquery-pjax)
- [Nestable](http://dbushell.github.io/Nestable/)
- [noty](http://ned.im/noty/)
- [X-editable](http://github.com/vitalets/x-editable)
- [bootstrap-number-input](https://github.com/wpic/bootstrap-number-input)

###  Health Score

26

—

LowBetter than 43% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity6

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity61

Established project with proven stability

 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.

###  Release Activity

Cadence

Every ~0 days

Total

4

Last Release

3245d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/02c55ee9be8de95608e5ed6d9bcefff86f3c5a15f49da5b9aa9ce8a4a28f85cc?d=identicon)[tonywang](/maintainers/tonywang)

---

Top Contributors

[![ciel622](https://avatars.githubusercontent.com/u/84898253?v=4)](https://github.com/ciel622 "ciel622 (1 commits)")

---

Tags

laravelgridformadminchart

###  Code Quality

TestsPHPUnit

### Embed Badge

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

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

###  Alternatives

[encore/laravel-admin

laravel admin

11.2k3.1M443](/packages/encore-laravel-admin)

PHPackages © 2026

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