mostafaznv/nova-morph-filter
Composer 安装命令:
composer require mostafaznv/nova-morph-filter
包简介
Morph Filter for Laravel Nova
README 文档
README
Morph Filter for Laravel Nova
Morph filter fields for laravel nova
I develop in a open-source journey 🚀, I wish I lived in an environment where financial situation was fine and I could only focus on the path, but as you may know, life isn't perfect. So if you end up using my packages, please consider making a donation, any amount would go along way and is much appreciated. 🍺
Requirements:
- PHP 8.0 or higher
- Laravel 8.* or higher
Installation
Install using composer:
composer require mostafaznv/nova-morph-filter
Usage
use Mostafaznv\NovaMorphFilter\NovaMorphFilter;
class Post extends Resource
{
...
public function fields(Request $request): array
{
return [
...
MorphTo::make(trans('Owner'), 'owner')
->types([Admin::class, User::class])
];
}
public function filters(Request $request): array
{
return [
(new NovaMorphFilter(trans('Owner'), 'owner'))
->types([User::class, Admin::class])
];
}
}
I develop in a open-source journey 🚀, I wish I lived in an environment where financial situation was fine and I could only focus on the path, but as you may know, life isn't perfect. So if you end up using my packages, please consider making a donation, any amount would go along way and is much appreciated. 🍺
Changelog
Refer to the Changelog for a full history of the project.
License
This software released under Apache License Version 2.0.
(C) 2022 Mostafaznv, All rights reserved.
统计信息
- 总下载量: 730
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 3
- 点击次数: 2
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2022-01-30