treestoneit/belongs-to-field 问题修复 & 功能扩展

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

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

treestoneit/belongs-to-field

最新稳定版本:v0.1

Composer 安装命令:

composer require treestoneit/belongs-to-field

包简介

A Laravel Nova Belongs To field that respects Eager Loading

README 文档

README

A Laravel Nova Belongs To field that respects Eager Loading

In current version of Laravel Nova Eager Loading is not working with Default BelongsTo Field

For a temporary workaround that does not break updatability:

We made a new field that extends the existing BelongsTo Class

Installation

Install the package into a Laravel app that uses Nova with Composer:

composer require treestoneit/belongs-to-field

To use

Change all uses of BelongsTo to this BelongsToField.

If a proper fix is available in the future, just change it back to the nova one.

So resulting code resource should look like this:

...
use Treestoneit\BelongsToField\BelongsToField;
...
...
public function fields(Request $request)
    {
        return [
        ...
            BelongsToField::make('User')
        ...
        ];
    }
...
... 

Credits

Thanks to Michael Münch for this solution

统计信息

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

GitHub 信息

  • Stars: 5
  • Watchers: 2
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 未知

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固