https://github.com/pmochine/laravel-report
✅Get feedback from your users by allowing them to report stuff
https://github.com/pmochine/laravel-report
feedback judge laravel report reportable
Last synced: 8 months ago
JSON representation
✅Get feedback from your users by allowing them to report stuff
- Host: GitHub
- URL: https://github.com/pmochine/laravel-report
- Owner: pmochine
- License: mit
- Created: 2019-04-02T11:58:43.000Z (about 7 years ago)
- Default Branch: master
- Last Pushed: 2021-04-06T20:43:23.000Z (about 5 years ago)
- Last Synced: 2025-07-26T14:40:51.298Z (11 months ago)
- Topics: feedback, judge, laravel, report, reportable
- Language: PHP
- Homepage:
- Size: 44.9 KB
- Stars: 4
- Watchers: 0
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Laravel Report 📢
[]()
[](https://github.com/pmochine/Laravel-Report/releases)
## Installation
Require this package, with [Composer](https://getcomposer.org/), in the root directory of your project.
``` bash
$ composer require pmochine/laravel-report
```
To get started, you'll need to publish the vendor assets and migrate:
```
php artisan vendor:publish --provider="Pmochine\Report\ReportServiceProvider" && php artisan migrate
```
## Usage
## Setup a Model
``` php
report([
'reason' => \Str::random(10),
'meta' => ['some more optional data, can be notes or something'],
], $user);
```
#### Create a conclusion for a Report and add the User Model as "judge" (useful to later see who or what came to this conclusion)
``` php
$report->conclude([
'conclusion' => 'Your report was valid. Thanks! We\'ve taken action and removed the entry.',
'action_taken' => 'Record has been deleted.' // This is optional but can be useful to see what happend to the record
'meta' => ['some more optional data, can be notes or something'],
], $user);
```
#### Get the conclusion for the Report Model
``` php
$report->conclusion;
```
#### Get the judge for the Report Model (only available if there is a conclusion)
``` php
$report->judge(); // Just a shortcut for $report->conclusion->judge
```
#### Get an array with all Judges that have ever "judged" something
``` php
Report::allJudges();
```
## Testing
``` bash
$ phpunit
```
## Security
If you discover any security related issues, please don't email me. I'm afraid 😱. avidofood@protonmail.com
## Credits
Now comes the best part! 😍
This package is based on
- [Brian Faust's Laravel-Reportable](https://github.com/faustbrian/Laravel-Reportable)
- [All Contributors](../../contributors)
## License
[MIT](LICENSE) © [Brian Faust](https://brianfaust.me)