1. Go to this page and download the library: Download syriable/laravel-casework 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/ */
syriable / laravel-casework example snippets
use Syriable\Casework\Facades\Casework;
use Syriable\Casework\Support\Outcome;
// Mark models: Reportable + InteractsWithReports,
// Restrictable + InteractsWithRestrictions.
$report = Casework::report($post)
->by($user)
->because('spam')
->comment('Links to a phishing site')
->file();
$case = Casework::openCase($post)->bySystem()->open();
$decision = Casework::decide($case)
->by($moderator)
->outcome(Outcome::UPHOLD)
->withSuspension(days: 30)
->finalize(); // case + reports + restriction + audit, atomically
$user->isSuspended(); // one indexed query, expiry honored in real time
$appeal = Casework::appeal($decision)->by($user)->submit();
Casework::resolveAppeal($appeal)->by($reviewer)->overturn();