1. Go to this page and download the library: Download rynbd/lyrapanel 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/ */
rynbd / lyrapanel example snippets
use Rynbd\LyraPanel\Traits\HasRoles;
use Rynbd\LyraPanel\Traits\HasPrivileges;
use Rynbd\LyraPanel\Traits\HasSuspension;
class User extends Authenticatable
{
use HasRoles, HasPrivileges, HasSuspension;
}
// Suspend a user
$user->suspend('Violation of terms', now()->addDays(7));
// Unsuspend
$user->unsuspend();
// Check status
$user->isSuspended(); // bool
use Rynbd\LyraPanel\Support\AuditLogger;
// Manual logging
AuditLogger::log('custom_action', $model, 'Description of what happened');
// With old/new values
AuditLogger::logUpdate($model, $oldValues, $newValues);