PHP code example of b61 / laravel-reportable
1. Go to this page and download the library: Download b61/laravel-reportable library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
b61 / laravel-reportable example snippets
php artisan vendor:publish --provider="BrianFaust\Reportable\ReportableServiceProvider" && php artisan migrate
php
$post->report([
'reason' => str_random(10),
'meta' => ['some more optional data, can be notes or something'],
], $user);
php
$report->conclusion;
php
$report->judge(); // Just a shortcut for $report->conclusion->judge
php
Report::allJudges();