2017 © Pedro Peláez
 

library daimakuai

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

image

jblv/daimakuai

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

  • Thursday, July 26, 2018
  • by happyonion
  • Repository
  • 1 Watchers
  • 3 Stars
  • 39 Installations
  • PHP
  • 8 Dependents
  • 0 Suggesters
  • 4 Forks
  • 2 Open issues
  • 12 Versions
  • 0 % Grown

The README.md

Daimakuai

Build Status StyleCI Scrutinizer Code Quality Packagist Latest Stable Version Total Downloads Awesome Laravel Join the chat at https://gitter.im/daimakuai/daimakuai, (*1)

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

Demo 账号/密码:admin/admin, (*3)

截图

PC端访问, (*4)

daimakuai, (*5)

手机端访问, (*6)

daimakuai, (*7)

安装

首先确保安装好了 Composer Laravel,并且数据库连接设置正确,如果没有安装,请访问安装Laravel进行安装。, (*8)

Laravel 5.5

composer require jblv/daimakuai "dev-master" -vvv

示例如:

> 修改composer为国内镜像,加速下载
composer config -g repo.packagist composer https://packagist.phpcomposer.com

composer create-project laravel/laravel=5.5.* bbcshop -vvv

composer require jblv/daimakuai "2.0" -vvv

注意:
> bt宝塔服务器需要先关闭以下几个禁用函数: putenv  pcntl_signal proc_open


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

Jblv\Admin\Providers\AdminServiceProvider::class, (*9)


然后运行下面的命令完成安装: Laravel 5.5 > 安装前,对.env里的数据库等信息进行修改 php artisan vendor:publish --provider="Jblv\Admin\AdminServiceProvider" php artisan admin:install

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

宝塔部署注意

1、 伪静态增加: location / {
try_files $uri $uri/ /index.php$is_args$query_string;
}, (*11)

2、网站目录去掉 防跨站攻击(open_basedir), (*12)

3、网站目录 选择根目录,运行目录选择 public, (*13)

默认配置

安装完成之后,daimakuai所有的配置都在config/admin.php文件中。, (*14)

使用文档

目录结构

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

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

app/Admin/routes.php文件用来配置后台路由,详细使用请阅读路由配置。, (*16)

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

快速开始

Laravel自带的users表举例,表结构为:, (*18)

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, (*19)

daimakuai可以通过使用以下几步来快速生成users表的CURD操作页面:, (*20)

1.添加路由器

使用下面的命令来创建一个对应App\User模型的路由器, (*21)

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

上面的命令会创建路由器文件app/Admin/Controllers/UserController.php., (*22)

2.添加路由配置

daimakuai的路由配置文件app/Admin/routes.php里添加一行:, (*23)

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

3.添加左侧菜单栏连接

打开http://localhost:8000/admin/auth/menu,添加对应的menu, (*24)

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

4.创建表格表单

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

其它

daimakuai 基于以下组件或者服务:, (*27)

交流

QQ群:14086762, (*28)

License

daimakuai is licensed under The MIT License (MIT)., (*29)

The Versions

26/07 2018

dev-master

9999999-dev https://github.com/daimakuai/daimakuai

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

  Sources   Download

MIT

The Requires

 

The Development Requires

by yt

laravel form grid chart admin manage

26/07 2018

dev-analysis-8KQPAA

dev-analysis-8KQPAA https://github.com/daimakuai/daimakuai

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

  Sources   Download

MIT

The Requires

 

The Development Requires

by yt

laravel form grid chart admin manage

28/05 2018

dev-analysis-8KmR13

dev-analysis-8KmR13 https://github.com/happyonion/daimakuai

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

  Sources   Download

MIT

The Requires

 

The Development Requires

by yt

laravel form grid chart admin manage

28/05 2018

dev-analysis-qoGldP

dev-analysis-qoGldP https://github.com/happyonion/daimakuai

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

  Sources   Download

MIT

The Requires

 

The Development Requires

by yt

laravel form grid chart admin manage

13/12 2017

dev-analysis-XVxok6

dev-analysis-XVxok6 https://github.com/happyonion/daimakuai

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

  Sources   Download

MIT

The Requires

 

The Development Requires

by yt

laravel form grid chart admin manage

13/12 2017

dev-analysis-8byZ1j

dev-analysis-8byZ1j https://github.com/happyonion/daimakuai

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

  Sources   Download

MIT

The Requires

 

The Development Requires

by yt

laravel form grid chart admin manage

26/11 2017

v2.0.0

2.0.0.0 https://github.com/happyonion/daimakuai

`daimakuai` is administrative interface builder for laravel which can help you build CRUD backends just with few lines of code.

  Sources   Download

MIT

The Requires

 

The Development Requires

by yt

laravel form grid chart admin manage

24/11 2017

dev-analysis-z3PB59

dev-analysis-z3PB59 https://github.com/happyonion/daimakuai

`daimakuai` is administrative interface builder for laravel which can help you build CRUD backends just with few lines of code.

  Sources   Download

MIT

The Requires

 

The Development Requires

by yt

laravel form grid chart admin manage

24/11 2017

dev-analysis-8nona0

dev-analysis-8nona0 https://github.com/happyonion/daimakuai

`daimakuai` is administrative interface builder for laravel which can help you build CRUD backends just with few lines of code.

  Sources   Download

MIT

The Requires

 

The Development Requires

by yt

laravel form grid chart admin manage

24/11 2017

dev-analysis-qxKRx0

dev-analysis-qxKRx0 https://github.com/happyonion/daimakuai

`daimakuai` is administrative interface builder for laravel which can help you build CRUD backends just with few lines of code.

  Sources   Download

MIT

The Requires

 

The Development Requires

by yt

laravel form grid chart admin manage

11/11 2017

v1.5.0

1.5.0.0 https://github.com/happyonion/daimakuai

`daimakuai` is administrative interface builder for laravel which can help you build CRUD backends just with few lines of code.

  Sources   Download

MIT

The Requires

 

The Development Requires

by yt

laravel form grid chart admin manage

09/05 2017

v1.0.0

1.0.0.0 https://github.com/happyonion/daimakuai

`daimakuai` is administrative interface builder for laravel which can help you build CRUD backends just with few lines of code.

  Sources   Download

MIT

The Requires

 

The Development Requires

by yt

laravel form grid chart admin manage