使用 Laravel Pipe Dream 快速构建 Laravel 基础应用
原文来自 Laravel News。 Github 地址
近日在 Laravel-News 上发现了一个包,能够根据我们的模型快速创建控制器,迁移文件,Seeder等。
使用方法
安装
composer require --dev pipe-dream/laravel
使用
安装成功之后就可以访问 /pipe-dream
路径进行应用构建。
在页面第一个 tab 中,我们写入我们需要的模型和字段。
// 使用Demo
// use PascalCase for models
Garage
location
capacity
// Separate your entities into chunks
Car
color
user_id // foreign key
// use snake_case model1_model2 to setup a ManyToMany relationship
car_garage
// use button to add a default user system
User
name
email
email_verified_at
password
remember_token
// use snake_case to create a table
password_resets
email
token
我们可以随意更改预览中的文件,最后我们点击 Build 就会为我们生成了对应的文件。
推荐文章: