PHPackages                             firalabs/firadmin - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Admin Panels](/categories/admin)
4. /
5. firalabs/firadmin

Abandoned → [laravel/laravel](/?search=laravel%2Flaravel)Library[Admin Panels](/categories/admin)

firalabs/firadmin
=================

Basic admin panel for Laravel 4 with login and user controller implementation

1.2.0(12y ago)4454610[1 issues](https://github.com/firalabs/firadmin/issues)PHPPHP &gt;=5.3.0

Since Jun 7Pushed 11y ago8 watchersCompare

[ Source](https://github.com/firalabs/firadmin)[ Packagist](https://packagist.org/packages/firalabs/firadmin)[ RSS](/packages/firalabs-firadmin/feed)WikiDiscussions master Synced today

READMEChangelogDependencies (5)Versions (10)Used By (0)

!!! DEPRECATED !!!
------------------

[](#-deprecated-)

**This package is no longer actively maintained. The next version of Laravel 5 should propably contain all basic stuff you need to start a admin panel.**

\#Firadmin Laravel 4 package used to create a beautiful admin panel with default user managment. This package is currently under active development, following Laravel 4.

[![Build Status](https://camo.githubusercontent.com/4430228b1a02e62eabd01898ae0f13d399fd099167f6c6bb65bf803c33dcb811/68747470733a2f2f7472617669732d63692e6f72672f666972616c6162732f66697261646d696e2e706e67)](https://travis-ci.org/firalabs/firadmin)[![Total Downloads](https://camo.githubusercontent.com/c9073ace89a03ef3e06ee2eb7e2c95d58e06724283672536fd837090bff88bb1/68747470733a2f2f706f7365722e707567782e6f72672f666972616c6162732f66697261646d696e2f646f776e6c6f6164732e706e67)](https://packagist.org/packages/firalabs/firadmin)[![Latest Stable Version](https://camo.githubusercontent.com/31ba8febc0f0eddb312a276e5dfc9c4a0efaf7f5d8f5754b79252400cc840c58/68747470733a2f2f706f7365722e707567782e6f72672f666972616c6162732f66697261646d696e2f762f737461626c652e706e67)](https://packagist.org/packages/firalabs/firadmin)

\##Features

- Resourceful User management with roles permissions
- Base controller use for admin panel development
- ACL component for privilege management
- Complete UI admin panel using Twitter Bootstrap 2.3
- Complete login component with password reset and reminder
- Easily configurable

\##Installation

For laravel 4.0 use firadmin version 1.0.\* and for laravel 4.1 use firadmin version 1.1.\* and above.

Begin by installing this package through Composer. Edit your project's `composer.json` file to require `firalabs/firadmin`.

```
{
    "require": {
        "firalabs/firadmin": "dev-master"
    }
}
```

Update your packages with `composer update` or install with `composer install`.

Once this operation completes, you need to add the service provider. Open `app/config/app.php`, and add a new item to the providers array.

```
Firalabs\Firadmin\FiradminServiceProvider
```

Documentation
-------------

[](#documentation)

- [Screenshots](#screenshots)
- [Configurations](#configurations)
- [Binding models](#binding-models)
- [Migrations](#migrations)
- [Create default user](#create-default-user)
- [Register dashboard controller](#register-dashboard-controller)
- [Facades](#facades)
- [Permissions](#permissions)
- [Ajax request](#ajax-request)
- [Admin controller development](#admin-controller-development)
- [Custom models repositories](#custom-models-repositories)

\##Screenshots [![firadmin login](https://camo.githubusercontent.com/3d4f1ad700536b8921a452f14b6935945f04ff9831bb20ab8ff57838afef90f0/68747470733a2f2f7261772e6769746875622e636f6d2f666972616c6162732f66697261646d696e2f6d61737465722f73637265656e73686f74732f6c6f67696e2e706e67)](#screenshots-login)[![firadmin user-admin](https://camo.githubusercontent.com/1ce04df07950133a16b7631c75a0e65082dea10a77ddf9ca9564fde54ef01998/68747470733a2f2f7261772e6769746875622e636f6d2f666972616c6162732f66697261646d696e2f6d61737465722f73637265656e73686f74732f757365722d61646d696e2e706e67)](#screenshots-user-admin)

\##Configurations

To configure the package to meet your needs, you must publish the configuration in your application before you can modify them. Run this artisan command.

```
php artisan config:publish firalabs/firadmin
```

The configuration files could now be found in `app/config/packages/firalabs/firadmin`. Read the description for each configurations to know what you can override.

\##Binding models

You need to bind a user and a user role model to your application. By default, the package already provide those. Add this few lines in `app/start/global.php`

```
/*
|--------------------------------------------------------------------------
| 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
```

After that, you must set the same user repository has a model in `app/config/auth.php`

```
'model' => 'Firalabs\Firadmin\Repository\Eloquent\UserRepository'

```

\##Migrations

If you use the default models provided in the package, you must run this migration commands.

```
php artisan auth:reminders
php artisan migrate
php artisan migrate --package="firalabs/firadmin"
```

\##Create default user

You need to have at least one register user in your database. We provided a easy way to create a user using artisan command. Use `--role=""administrator""` when setting up a user for the first time.

```
php artisan create:user [--role[="..."]] username email password
```

You can also change the role names Firadmin checks on `app/config/packages/firalabs/firadmin/config.php`.

```
'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'))
)
```

\##Register dashboard controller

You must set a route to the dashboard admin panel in `app/routes.php`. We provide a default dashboard controller for testing purpose.

```
/*
|--------------------------------------------------------------------------
| Register admin controllers
|--------------------------------------------------------------------------
*/
Route::group(array ('before' => 'auth', 'prefix' => 'admin' ), function ()
{
	Route::get('/', 'Firalabs\Firadmin\Controllers\DashboardController@getIndex');
});
```

\##Facades

We have two available facades:

- Permissions
- AjaxRequest

You can add this facade to your `app/config/app.php` file.

```
array(
	'aliases' => array(
		'AjaxRequest' => 'Firalabs\Firadmin\Facades\AjaxRequest',
		'Permissions' => 'Firalabs\Firadmin\Facades\Permissions'
	)
);
```

\##Permissions

To handle privileges on the current logged user, simply use this code in your controller action method..

```
//Check permission
if(Permissions::isAllowed(Auth::user(), 'user', 'read') !== true){
	return Redirect::route('login')
		->with('reason', Lang::get('firadmin::admin.messages.insufficient-permission') . '')
		->with('error', 1);
}
```

\##Ajax Request Documentation coming soon ...

\##Admin controller development

When you want to create a new admin controller, simply extend the BaseController provide in the package. Is a example of a dashboard controller create in the folder `app/controllers/Admin/DashboardController.php`

```
