在线时间:8:00-16:00
迪恩网络APP
随时随地掌握行业动态
扫描二维码
关注迪恩网络微信公众号
开源软件名称(OpenSource Name):reliese/laravel开源软件地址(OpenSource Url):https://github.com/reliese/laravel开源编程语言(OpenSource Language):PHP 100.0%开源软件介绍(OpenSource Introduction):Reliese Laravel Model GeneratorReliese Laravel Model Generator aims to speed up the development process of Laravel applications by providing some convenient code-generation capabilities. The tool inspects your database structure, including column names and foreign keys, in order to automatically generate Models that have correctly typed properties, along with any relationships to other Models. How does it work?This package expects that you are using Laravel 5.1 or above.
You will need to import the ConfigurationIt is recommended that this package should only be used on a local environment for security reasons. You should install it via composer using the --dev option like this: composer require reliese/laravel --dev Add the php artisan vendor:publish --tag=reliese-models
# Let's refresh our config cache just in case
php artisan config:clear ModelsUsageAssuming you have already configured your database, you are now all set to go.
php artisan code:models
php artisan code:models --table=users
php artisan code:models --connection=mysql
php artisan code:models --schema=shop Customizing Model ScaffoldingTo change the scaffolding behaviour you can make Tips1. Keeping model changesYou may want to generate your models as often as you change your database. In order
not to lose your own model changes, you should set When you enable this feature your models will inherit their base configurations from base models. You should avoid adding code to your base models, since you will lose all changes when they are generated again.
SupportFor the time being, this package supports MySQL, PostgreSQL and SQLite databases. Support for other databases are encouraged to be added through pull requests. |
2023-10-27
2022-08-15
2022-08-17
2022-09-23
2022-08-13
请发表评论