inani/nova-resource-maker 问题修复 & 功能扩展

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

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

inani/nova-resource-maker

最新稳定版本:1.0

Composer 安装命令:

composer require inani/nova-resource-maker

包简介

A Laravel Nova package to help you generate resources fields

README 文档

README

License Total Downloads CI status Latest Stable Version

A Nova tool that will help you to generate fields array for the resource.
You can check this medium post on how to use it

Installation

Requirements

  • Laravel Nova

First, install the package through Composer.

composer require inani/nova-resource-maker

Usage

Run the commande line

php artisan nova-resource-fields:generate

if your model within app folder, you can just set Model Name only without full namespace

And then just answer to the questions and copy the result.

Relationships

Now its possible to generate the relationships, all you have to do is to add the name of the relationship class in the Doc comment of the method

/**
 * Get the posts
 *
 * @relation('HasMany')
 * @return \Illuminate\Database\Eloquent\Relations\HasMany
 */
public function posts()
{
    return $this->hasMany(Post::class);
}

Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

Please make sure to update tests as appropriate.

License

MIT

统计信息

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

GitHub 信息

  • Stars: 25
  • Watchers: 1
  • Forks: 5
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2018-08-23