https://github.com/codeat3/laravel-nova-likeable
https://github.com/codeat3/laravel-nova-likeable
Last synced: 8 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/codeat3/laravel-nova-likeable
- Owner: codeat3
- License: mit
- Created: 2020-02-04T14:56:14.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2021-03-12T13:22:52.000Z (over 5 years ago)
- Last Synced: 2025-05-28T20:17:55.966Z (about 1 year ago)
- Language: PHP
- Size: 41 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- Contributing: CONTRIBUTING.md
- License: LICENSE.md
Awesome Lists containing this project
README
# A laravel nova package for the `rtconner/laravel-likeable`
[](https://packagist.org/packages/codeat3/laravel-nova-likeable)
[](https://travis-ci.org/codeat3/laravel-nova-likeable)
[](https://scrutinizer-ci.com/g/codeat3/laravel-nova-likeable)
[](https://packagist.org/packages/codeat3/laravel-nova-likeable)
A nova resource package of `rtconner/laravel-likeable` for your `laravel/nova` application.
## Installation
You can install the package via composer:
```bash
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.
``` php
class Post extends Resource {
...
public function fields(Request $request)
{
return [
...
MorphMany::make('Likes', 'likes', \Codeat3\LaravelNovaLikeable\Resources\Like::class),
];
}
}
```
### Testing
``` bash
composer test
```
### Changelog
Please see [CHANGELOG](CHANGELOG.md) for more information what has changed recently.
## Contributing
Please see [CONTRIBUTING](CONTRIBUTING.md) for details.
### Security
If you discover any security related issues, please email swapnilsarwe@gmail.com instead of using the issue tracker.
## Credits
- [Swapnil Sarwe](https://github.com/codeat3)
- [All Contributors](../../contributors)
## License
The MIT License (MIT). Please see [License File](LICENSE.md) for more information.
## Laravel Package Boilerplate
This package was generated using the [Laravel Package Boilerplate](https://laravelpackageboilerplate.com).