codeat3 / laravel-nova-likeable
1.1.0
2021-03-12 13:21 UTC
Requires
- php: ^7.3|^8.0
- illuminate/support: ^8.0
- rtconner/laravel-likeable: ^3.0
Requires (Dev)
- friendsofphp/php-cs-fixer: ^2.16
- orchestra/testbench: ^6.0
- phpunit/phpunit: ^9.3
README
A nova resource package of rtconner/laravel-likeable
for your laravel/nova
application.
Installation
You can install the package via composer:
composer require codeat3/laravel-nova-likeable
Usage
If you have a Nova resource Post
on which you have used the trait Likeable
, you can simply add the line in the Nova resource.
class Post extends Resource { ... public function fields(Request $request) { return [ ... MorphMany::make('Likes', 'likes', \Codeat3\LaravelNovaLikeable\Resources\Like::class), ]; } }
Testing
composer test
Changelog
Please see CHANGELOG for more information what has changed recently.
Contributing
Please see CONTRIBUTING for details.
Security
If you discover any security related issues, please email swapnilsarwe@gmail.com instead of using the issue tracker.
Credits
License
The MIT License (MIT). Please see License File for more information.
Laravel Package Boilerplate
This package was generated using the Laravel Package Boilerplate.