开发常用命令_转载于TAY
一、创建文件 以下:"-" 为原型,"+" 为示例命令 Test。
1.创建控制器
- php artisan make:controller Controller --resource
+ php artisan make:controller TestController --resource
2.创建模型
- php artisan make:model
+ php artisan make:model Test
3.创建控制器带模型
- php artisan make:controller Controller --resource --model
+ php artisan make:controller TestController --resource --model Test
4.创建授权策略
- php artisan make:Policy
+ php artisan make:Policy TestPolicy
5.创建模型观察者
- php artisan make:Observer
+ php artisan make:Observer TestObserver
6.创建请求类
- php artisan make:request
+ php artisan make:request TestRequest
7.创建中间件
- php artisan make:middleware
+ php artisan make:middleware Test
8.创建视图独立组件
- php artisan make:component
+ php artisan make:component Test
二、发布资源文件
php artisan vendor:publish
三、Debugbar 1.下载
composer require barryvdh/laravel-debugbar --dev
2.发布配置文件
php artisan vendor:publish --provider="Encore\Admin\AdminServiceProvider"
3.安装
php artisan admin:install
转载于:https://www.tryatry.com/post/647b313c1e1a8
最近访问时间:2025-04-30 11:04:27