Package Data | |
---|---|
Maintainer Username: | BillBostick |
Maintainer Contact: | bill@bosticks.com (Bill Bostick) |
Package Create Date: | 2015-11-24 |
Package Last Update: | 2015-11-24 |
Language: | PHP |
License: | MIT |
Last Refreshed: | 2024-11-19 03:17:43 |
Package Statistics | |
---|---|
Total Downloads: | 25 |
Monthly Downloads: | 0 |
Daily Downloads: | 0 |
Total Stars: | 1 |
Total Watchers: | 3 |
Total Forks: | 0 |
Total Open Issues: | 0 |
Badmin provides a simple admin interface for the authentication features that are built into Laravel 5.1, as well as the Laravel ACL package (https://github.com/kodeine/laravel-acl). The screens are based on Bootstrap and jQuery.
This package requires PHP 5.5.9 or greater. It has dependencies on the Illuminate/HTML and Kodeine/Laravel-ACL packages.
These instructions describe the installation of Badmin, Laravel-ACL, and the Illuminate/HTML package. If you already have either of the dependant packages installed, you may have already performed some of these steps.
Use composer to require the package:
$ composer require bostick/badmin:dev-master@dev
Add the service provides for HTML, Laravel-Acl, and Badmin to config/app.php:
'providers' => [
...
Illuminate\Html\HtmlServiceProvider::class,
Kodeine\Acl\AclServiceProvider::class,
Bostick\Badmin\BadminServiceProvider::class,
...
Add the aliases for HTML to config/app.php:
'aliases' => [
...
'Form' => Illuminate\Html\FormFacade::class,
'Html' => Illuminate\Html\HtmlFacade::class,
...
Add the HasRole trait to your User model (app/User.php). Note this issue at https://github.com/kodeine/laravel-acl/issues/90. The following code works with the current release of Laravel-ACL.
use Kodeine\Acl\Traits\HasRole;
...
class User extends Model implements AuthenticatableContract,
AuthorizableContract,
CanResetPasswordContract
{
use Authenticatable, Authorizable, CanResetPassword, HasRole {
HasRole::can insteadof Authorizable;
}
Use artisan to publish package features:
$ php artisan vendor:publish
Use artisan to run the migration scripts:
$ php artisan migrate
Add the following to your app/Http/Kernel.php
protected $routeMiddleware = [
'acl' => \Kodeine\Acl\Middleware\HasPermission::class,
];
Once it is installed, Badmin will provide views at the following routes:
login
logout
register
password/email
admin/user
admin/permission
admin/role
admin/access