1. Go to this page and download the library: Download daison/admin-laravel 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/ */
use Daison\AdminLaravel\AdminLaravel as Admin;
class MyController
{
private $admin;
public function __construct(Admin $admin)
{
$this->admin = $admin;
}
public function showProfile()
{
if ($this->admin->hasAnAccess(['superuser','agent']) == false) {
// It means the Authenticated user doesn't have roles
// Redirect the user, show the access not allowed page... and so on..
}
}
public function saveProfile()
{
// same thing as the showProfile() method.
}
}
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.