0
Laravel 主动生成 Model 通过三方包 ignasbernotas/laravel-model-generator
Laravel 通过第三方包直接从数据库的Table schema 生成Model。 可以节约很多时间.
地址:https://github.com/ignasbernotas/laravel-model-generator
安装
composer require ignasbernotas/laravel-model-generator --dev
- app/Providers/AppServiceProvider.php 新加下面内容
<?php
public function register()
{
if ($this->app->environment() == 'local') {
$this->app->register('Iber\Generator\ModelGeneratorProvider');
}
}
使用
php artisan make:models
其他参数
php artisan help make:models
Usage:
make:models [options]
Options:
--tables[=TABLES] Comma separated table names to generate
--prefix[=PREFIX] Table Prefix [default: DB::getTablePrefix()]
--dir[=DIR] 指定Model生成的目录。Model directory [default: "Models/"]
--extends[=EXTENDS] 设置继承的类。Parent class [default: "Illuminate\Database\Eloquent\Model"]
--fillable[=FILLABLE] Rules for $fillable array columns [default: ""]
--guarded[=GUARDED] Rules for $guarded array columns [default: "ends:_guarded"]
--timestamps[=TIMESTAMPS] Rules for $timestamps columns [default: "ends:_at"]
-i, --ignore[=IGNORE] Ignores the tables you define, separated with ,
-f, --force[=FORCE] Force override [default: false]
-s, --ignoresystem If you want to ignore system tables.
Just type --ignoresystem or -s
-m, --getset Defines if you want to generate set and get methods
-h, --help Display this help message
-q, --quiet Do not output any message
-V, --version Display this application version
--ansi Force ANSI output
--no-ansi Disable ANSI output
-n, --no-interaction Do not ask any interactive question
--env[=ENV] The environment the command should run under.
Recommend
相关搜索关键词
Recent search keywords
- firmware m2 rk3368
- rom m2 rk3368
- react
- kubernetes
- znsfs
- ZNS
- Scalar size does not match
- 超星学习通
- httpsonlineschoolal5com99214
- skillz
- JCMM
- 垃圾场
- monitoro.co
- monitoro
- insta
- -1 OR 3 422-422-1=0 0 0 1
- font_heading
- pretzelai
- Hackintosh
- A52S
- UPDATE ROM AC8227L - Android JCAC10003-OC2-V1.0.04R7-211119_1742
- -1 OR 3+422-422-1=0+0+0+1
- The Path to Reliability: How a QA Engineer Should Act in Non-Standard Situations
- -1 or 3 446-446-1=0 0 0 1 --
- WRP Android Video Player Pro" AND 7796=9605 AND "BfKb"="BfKb
- wrp android video player pro and 8553=8553-- woed
- AJG LONDON LTD
- All blooks in blocker
- fatbobman
- 5200L
- supermarket HTB
- netherlands
- https://m.youtube.com/watch?v=XylKubQFAkw#
- python数据处理
- moto
- MTK 8227L Android download
- w89941
- gold quest blooket
- gold quest
- Phoneinfoga
- Instrukcja
- nvst.ly
- nvstly
- trade hub
- madagascar
- smartos
- omnios
- 快
- proxy list.txt
- All blooket
- watch hentai app
- hentai stream app apk android
- hentai stream
- ssl pterodactyl
- BACKGROUND REMOVER
- code.daypilot.org
- drops
- YT9217B
- Loil
- 教你做任务之
- antranigv.am
- 转盘
- fbi
- 下列何者可能是黃禹錫造假研究成果的原因
- gaminator
- 程序员
- -1 OR 3+789-789-1=0+0+0+1 --
- @@flq3T
- glizzy
- wrp android video player pro) and 5868=4380-- htou
- fishy frenzy
- -1 or 2+47-47-1=0+0+0+1
- GitHub - glixzzy/blooket-hack: Multiple hacks that breaks the game
- 1050
- fx
- golden
- gloadal
- all the answers
- best kodi live tv
- spreadsho[
- gift
- -1" OR 3+854-854-1=0+0+0+1 --
- -1 OR 2+930-930-1=0+0+0+1
- truenas
- Automotive Lubricants Market
- keywords+AND+7652=7652
- 5767
- 盗刷信用卡商店
- virtual))) OR NOT 1220=3959#
- kahoot hack
- -1 or 3+446-446-1=0+0+0+1 --
- cabinet+maker+in+australia
- blooket+market+infininty+conis
- virtual or not 9584=4739
- cabinet maker in australia
- -1 or 2+786-786-1=0+0+0+1 --
- ketfgb0j
- download230413-2+32+13.rar
- 230413-2+32+13.rar
- chapter 20 samsung pt 2
这个已经没有更新不能用了, 项目维护的人推荐使用 https://github.com/reliese/laravel 代替。