trungpv93 / laravel-generator

InfyOm Laravel Generator

dev-develop 2016-10-24 16:10 UTC

README

Total Downloads Monthly Downloads Daily Downloads Latest Stable Version Latest Unstable Version License

文档位于 此处

安装

"require": {
	...
	"trungpv93/laravel-generator": "5.3.x-dev",
	"laravelcollective/html": "dev-master",
	"doctrine/dbal": "~2.3" //If you want to use Generate from Table option, you need to install
}

运行 update compose

composer update

添加服务提供者

Collective\Html\HtmlServiceProvider::class,
Laracasts\Flash\FlashServiceProvider::class, //If Use Flash Notification
Prettus\Repository\Providers\RepositoryServiceProvider::class,
\InfyOm\Generator\InfyOmGeneratorServiceProvider::class,

添加别名

'Form'      => Collective\Html\FormFacade::class,
'Html'      => Collective\Html\HtmlFacade::class,
'Flash'     => Laracasts\Flash\Flash::class, //If Use Flash Notification

发布供应商

php artisan vendor:publish

更新API路由

打开 app\Providers\RouteServiceProvider.php 并更新 mapApiRoutes 方法如下

Route::group([
    'middleware' => 'api',
    'namespace' => $this->namespace."\\API",
    'prefix' => 'api',
    'as' => 'api.',
], function ($router) {
    require base_path('routes/api.php');
});    

发布

php artisan infyom:publish

运行发布布局命令(可选)

php artisan infyom.publish:layout