wbe/crud
该包的最新版本(2.3.8)没有可用的许可证信息。
基于Rapyd的CRUD生成器的管理面板
2.3.8
2018-01-12 08:15 UTC
Requires
- php: ^5.6 || ^7.0
- barryvdh/laravel-elfinder: ^0.3.8
- baum/baum: *
- laravel/framework: ^5.5
- laravel/socialite: *
- wbe/rapyd: *
- dev-master
- 2.3.8
- 2.3.7
- 2.3.6
- 2.3.5
- 2.3.4
- 2.3.3
- 2.3.2
- 2.3.1
- 2.3
- 2.2
- 2.1.2
- 2.1.1
- 2.1
- 2.0.2
- 2.0.1
- 2.0
- 1.2.5
- 1.2.4
- 1.2.3
- 1.2.2
- 1.2.1
- 1.2
- 1.1
- 1.0.8.8
- 1.0.8.7
- 1.0.8.6
- 1.0.8.5
- 1.0.8.4
- 1.0.8.3
- 1.0.8.2
- 1.0.8.1
- 1.0.7.8
- 1.0.7.7
- 1.0.7.6
- 1.0.7.5
- 1.0.7.4
- 1.0.7.3
- 1.0.7.2
- 1.0.7
- 1.0.6
- 1.0.5
- 1.0.4
- 1.0.3
- 1.0.2
- 1.0.1
- 1.0.0
This package is not auto-updated.
Last update: 2024-09-28 19:47:34 UTC
README
在Laravel 5.5中安装
- 配置。将
config/database.php
中的'strict' => true
替换为'strict' => false
(laravel/framework#14997 (评论))
-
添加到
config/auth.php
'guards' => [ 'admin' => [ 'driver' => 'session', 'provider' => 'admins', ],
'providers' => [ 'admins' => [ 'driver' => 'eloquent', 'model' => Wbe\Crud\Models\ContentTypes\User::class, ],
'passwords' => [ 'admins' => [ 'provider' => 'admins', 'table' => 'password_resets', 'expire' => 60, ],
-
添加到 config/app.php
'providers' => [ App\Providers\AppServiceProvider::class, App\Providers\AuthServiceProvider::class, // App\Providers\BroadcastServiceProvider::class, App\Providers\EventServiceProvider::class, App\Providers\RouteServiceProvider::class, Laravel\Socialite\SocialiteServiceProvider::class, //Barryvdh\LaravelIdeHelper\IdeHelperServiceProvider::class, Zofe\Rapyd\RapydServiceProvider::class, //Laravel\Cashier\CashierServiceProvider::class, Barryvdh\Elfinder\ElfinderServiceProvider::class, Wbe\Crud\Models\hrbac\HierarchicalRBAC\HRBACServiceProvider::class, Wbe\Crud\CrudServiceProvider::class
'aliases' => [ 'Form' => Collective\Html\FormFacade::class, 'Html' => Collective\Html\HtmlFacade::class, 'Socialite' => Laravel\Socialite\Facades\Socialite::class, //'DataEdit' => Zofe\Rapyd\DataEdit\DataEdit::class,
- 将 helper.php 添加到 composer 自动加载部分
"files": [ "vendor/wbe/crud/src/helpers.php" ]
- 添加到 app\Http\Kernel.php
protected $middleware = [ \Illuminate\Session\Middleware\StartSession::class, \Wbe\Crud\Middleware\Locale::class, \Wbe\Crud\Middleware\LangMiddleware::class, \Wbe\Crud\Middleware\AdminAccessMiddleware::class,
protected $routeMiddleware = [ 'customer' => \Wbe\Crud\Middleware\RedirectIfNotCustomer::class, 'customer.guest' => \Wbe\Crud\Middleware\RedirectIfCustomer::class, 'admin' => \Wbe\Crud\Middleware\RedirectIfNotAdmin::class, 'admin.guest' => \Wbe\Crud\Middleware\RedirectIfAdmin::class,
protected $middlewareGroups = [ 'admin'=>[ \Illuminate\View\Middleware\ShareErrorsFromSession::class, ],
- 在控制台中运行
php artisan vendor:publish --provider="Zofe\Rapyd\RapydServiceProvider"
php artisan vendor:publish --provider="Wbe\Crud\CrudServiceProvider"
php artisan elfinder:publish
php artisan migrate
php artisan db:seed --class="\Wbe\Crud\seeds\DatabaseSeeder"
composer dump-autoload
mkdir public/files/
添加别名
如果描述表中存在别名列,则自动生成别名,别名将从列标题生成
从添加页面添加重定向配置
在 config/crud.php 中
'edit_redirect' => env('edit_redirect', 1)
默认值 1
1 - 重定向到编辑页面 0 - 重定向到数据页面
迁移将创建表并填充默认数据。它还包含数据库中的数据插入(如播种)。
最后,管理员URL
密码:111111