mirhamzah/laravel-interactive-make
Composer 安装命令:
composer require mirhamzah/laravel-interactive-make
包简介
Interactive make commands for making Model and Migration with fields
README 文档
README
Interactive make commands for making Model and Migration with fields
composer require mirhamzah/laravel-interactive-make:dev-master
Then
php artisan make:imodel ModelName
Or
php artisan make:imodel ModelName -m
for making a new migration as well, just like with normal make:model command.
You can add relationships to existing model files using the command
#php artisan make:relationship [SourceModel] [RelationshipType] [TargetModel]
php artisan make:relationship User HasMany Acrticle
The above command will add following code to User model file:
use Illuminate\Database\Eloquent\Relations\HasMany; public function articles(): ?HasMany { return $this->hasMany(Article::class); }
php artisan make:iview ModelName
The make:iview command generates view components for the specified model. It creates two files, create.jsx and edit.jsx, which are React components designed for creating and editing instances of the model. These components are automatically populated with form fields based on the $fillable and $casts properties defined in the model class, ensuring consistency between the model and its associated views.
统计信息
- 总下载量: 9
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: Unknown
- 更新时间: 2023-08-02
