admin
Installation
New Project installation
In project Finder
curl -sS https://raw.githubusercontent.com/zhuayi/admin/master/compose-laravel.sh | sh
####In order to install Laravel 5 Zhuayi, just add
"zhuayi/admin": "~1.0.0"
to your composer.json. Then run composer install or composer update.
Then in your config/app.php add
Zhuayi\admin\BaseAdminServiceProvider::class
If you are going to use Middleware (requires Laravel 5.1 or later) you also need to add
'admin' => \Zhuayi\admin\Middleware\AdminMiddleware::class
to routeMiddleware array in app/Http/Kernel.php.
modify config/auth.php
'model' => Zhuayi\admin\Models\User::class
Run Publish
php artisan vendor:publish --force
php artisan migrate:refresh
##configure modify DB info to .env
Run autoload
composer dump-autoload --optimize
Run db:seed
php artisan db:seed --class="AdminDataSeeder"
##Usage
Your Application Routes in
Route::group(['middleware' => ['admin']], function() {
...
});