This article mainly shares with you how to create a command line in Laraverl. I hope it can help you.
1. Create project: composer create-project --prefer-dist laravel/laravel blog
2. Command must be in laravelProjectExecute under the root directory, otherwise "Could not open input file: artisan"
3. Display Lavarel version php artisan -- version
4. List all commandsphp artisan list
5.Create app PHP file under the /Modules/User/Model folder php artisan make:model Modules/User/Model/User
6. Create Module module php artisan make:module blog
7. Create the controller under Module php artisan make:module:controller blog PostController
8. Create the table under Migration php artisan make:module:migration blog create_posts_table
9. Create the migration database table php artisan module:migrate
Related recommendations:
PHP command line execution example
How to implement HTML-like command line interface
The above is the detailed content of Laraverl implements creating command line. For more information, please follow other related articles on the PHP Chinese website!