Skip to content
This repository has been archived by the owner on May 16, 2021. It is now read-only.
/ la-a-duo Public archive

[laravel-admin]一个网站使用不同的前缀复用多套admin(One website uses different prefixes to reuse multiple sets of admins)

License

Notifications You must be signed in to change notification settings

ichynul/la-a-duo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

62 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

现在不怎使用laravellaravel-admin了,遇到问题我未必能帮到你,如果你打算使用此扩展,需要有一定的解决问题能力。如果你解决了什么问题,欢迎提交pr

laravel-admin la-a-duo

Installation

Run :

$ composer require ichynul/la-a-duo

Then run:

$ php artisan admin:import la-a-duo

Config

Add a config in config/admin.php:

    'extensions' => [
        'la-a-duo' => [
           // Set to `false` if you want to disable this extension
            'enable' => true,
            // ['admin1' ,'admin2' , ...]
            'prefixes' => ['admin1'],
            // Set to `false` allow login to different prefixes in same brower
            'apart' => true,
            // Set to `true` allow extend routes from base admin , Such as http://localhost/admin1/goods => Admin\Controllers\GoodsController@index 
            'extend_routes' => false,
            // Base admin_tables migration file path, if new prefix use different database setting , copy this file for it
            'base_migration' => database_path('migrations/2016_01_04_173148_create_admin_tables.php')
        ]
    ],

Usage

Open http://your-host/admin/la-a-duo

After this it will create files in /app/admin1 and create config file /config/admin1.php

Then open http://your-host/admin1

Commonds

$ php artisan laaduo:{action} {prefix?}

If no prefix, for all

$ php artisan laaduo:install admin1

Create /app/Admin1 dir and create routes.php and controllers

$ php artisan laaduo:route admin1

Create /app/Admin1/extroutes.php

$ php artisan laaduo:build admin1

Create /database/migrations/admin1/2016_01_04_173148_create_admin_tables_admin1.php and migrate.

$ php artisan laaduo:seed admin1

Seed AdminTablesSeeder seed admin tables(users,rols,menus...), if table is not empty, will pass it


Licensed under The MIT License (MIT).

About

[laravel-admin]一个网站使用不同的前缀复用多套admin(One website uses different prefixes to reuse multiple sets of admins)

Resources

License

Stars

Watchers

Forks

Packages

No packages published