waad/generate-design-pattern 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

waad/generate-design-pattern

Composer 安装命令:

composer require waad/generate-design-pattern

包简介

package to generate repository design pattern dev

README 文档

README

you can create your restful api easily by using this library

Installation:

Require this package with composer using the following command:

composer require waad/generate-design-pattern
php artisan vendor:publish --provider=Waad\Repository\RepositoryServiceProvider 

Usage

in Model
$fillable = ['id',....];
This is where you will write sortable, filterable columns
in Model
$relations = ['category','post.user'];
This is where you will write relations column
in app\Providers\AppServiceProvider.php file
public function boot()
    {
        $registrar = new \Waad\Repository\Helpers\Routing($this->app['router']);
        $this->app->bind('Illuminate\Routing\ResourceRegistrar', function () use ($registrar) {
            return $registrar;
        });
    }

Commands:

full command
php artisan repo:model User --c --r --m
or if you have model
php artisan repo:model User --c --r --model=User
and you can use --force command

create validation

php artisan repo:validation User

Available command options:

Command Description
--c Create Controller and linked with repository
--m Create Model and linked with Controller Functions
--model={ModelName} Insert model in controller if you have model
--r Create apiResource Route in api.php
--force override existing Repository

License

Laravel Design Pattern Generator is free software licensed under the MIT license.

统计信息

  • 总下载量: 7
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 3
  • 点击次数: 0
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 3
  • Watchers: 1
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2023-03-22