Ezadev Admin Commands

Ezadev-admin has several console commands built in to help with development. Once Ezadev-admin is installed, you can use them directly.

artisan admin

Use the php artisan admin command to display the current version of Ezadev-admin and list all available admin commands.

$ php artisan admin
  ______              _                            _           _       
 |  ____|            | |                          | |         (_)      
 | |__   ______ _  __| | _____   ________ __ _  __| |_ __ ___  _ _ __  
 |  __| |_  / _` |/ _` |/ _ \ \ / /______/ _` |/ _` | '_ ` _ \| | '_ \ 
 | |____ / / (_| | (_| |  __/\ V /      | (_| | (_| | | | | | | | | | |
 |______/___\__,_|\__,_|\___| \_/        \__,_|\__,_|_| |_| |_|_|_| |_|


Ezadev-admin version 0.0.6

Available commands:
 admin:make             Make admin controller
 admin:menu             Show the admin menu
 admin:install          Install the admin package
 admin:uninstall        Uninstall the admin package
 admin:import           Import a Ezadev-admin extension
 admin:create-user      Create a admin user
 admin:reset-password   Reset password for a specific admin user

artisan admin:make

This command is used to create the admin controller, passing in a model, it will build the required code of the three grid, form and show pages according to the fields of the model corresponding table.

$ php artisan admin:make PostController --model=App\\Post

// In the windows system
$ php artisan admin:make PostController --model=App\Post

App\Admin\Controllers\PostController created successfully.

Then open app/Admin/Controllers/PostController.php and you will see the code generated by this command.

If you add the option --output or -O, the code will be printed without creating a controller file.

artisan admin:install & artisan admin:uninstall

These two commands are used to install and uninstall the Ezadev-admin package, where admin:install will create several files or directories in the project.

.
├── app/Admin/
├── config/admin.php
├── resources/lang/
│     └── lang/
│       ├── en/admin.php
│       └── zh-CN/admin.php
├── database/migrations/2016_01_04_173148_create_admin_tables.php
└── public/vendor/Ezadev-admin/

Running artisan admin:uninstall will delete these files or directories

artisan admin:create-user

This command is used to create an admin user. After filling in the username and password interactively and selecting the role, a user can be created.

$ php artisan admin:create-user

 Please enter a username to login:
 >

artisan admin:reset-password

This command is used to reset the password for the specified user and operate according to the prompt of the command.

$ php artisan admin:reset-password

 Please enter a username who needs to reset his password:
 >

artisan admin:import

This command is used to import the relevant configuration after installing a Ezadev-admin extension. The specific usage is in the documentation of each extension.

artisan admin:menu

This is a no-use command to list the left menu data in json format.

Last updated