1. Go to this page and download the library: Download firalabs/firadmin 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/ */
firalabs / firadmin example snippets
Firalabs\Firadmin\FiradminServiceProvider
/*
|--------------------------------------------------------------------------
| Application IoC Container binding
|--------------------------------------------------------------------------
|*/
App::bind('Firalabs\Firadmin\Repository\UserRepositoryInterface', 'Firalabs\Firadmin\Repository\Eloquent\UserRepository'); //User model
App::bind('Firalabs\Firadmin\Repository\UserRoleRepositoryInterface', 'Firalabs\Firadmin\Repository\Eloquent\UserRoleRepository'); //User role model
'roles' => array(
/*
* Grant all privileges to the administrator roles.
*/
'administrator' => true,
/*
* Granted basics CRUD privileges to the user administrator role on the user resource.
*/
'user_administrator' => array('user' => array('create', 'read', 'update', 'delete'))
)
use Firalabs\Firadmin\Controllers\BaseController;
/**
* Default dashboard controller
*/
class Admin_DashboardController extends BaseController {
/**
* The current active menu URI
*
* @var string
*/
public $active_menu = 'admin';
/**
* Get the dashboard
*/
public function getIndex()
{
//Set layout content
$this->layout->content = View::make('firadmin::dashboard');
}
}