1. Go to this page and download the library: Download eloquent-works/exile 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/ */
namespace App\Models;
use EloquentWorks\Exile\Traits\Bannable;
use Illuminate\Foundation\Auth\User as Authenticatable;
class User extends Authenticatable
{
use Bannable;
}
use Illuminate\Support\Facades\Route;
Route::middleware(['auth', 'exile'])->group(function (): void {
Route::get('/dashboard', DashboardController::class);
});
use EloquentWorks\Exile\Enums\AppealStatus;
use EloquentWorks\Exile\Facades\Exile;
$appeal = Exile::submitAppeal(
$ban,
$user,
'I believe this enforcement was issued in error.',
);
Exile::resolveAppeal(
$appeal,
AppealStatus::Approved,
$reviewer,
'Appeal accepted.',
);