dev-master
9999999-devAdmin accounts for Laravel apps
MIT
The Requires
The Development Requires
by Krzysztof
1.0.0
1.0.0.0Admin accounts for Laravel apps
MIT
The Requires
The Development Requires
by Krzysztof
Wallogit.com
2017 © Pedro Peláez
Admin accounts for Laravel apps
This package provides a scaffold for creating admin accounts., (*2)
composer require airlabs/adminable
php artisan vendor:publish --provider="Airlabs\Adminable\AdminableServiceProvider" --tag="config"
php artisan migrate
<?php
namespace App;
use Airlabs\Adminable\Adminable;
...
class User
{
use Adminable, ...;
...
}
$user->isAdmin(); // true or false
php artisan adminable:create
Follow the prompts:, (*3)
, (*4)
This package can be customized. Look at the default config file (that can be published to config/adminable.php):, (*5)
<?php
return [
'column' => 'is_admin',
'table' => 'users',
'model' => 'App\User',
'required_fields' => [
'name', 'email'
],
'password_field' => 'password'
];
This packages comes with a blade helper called @admin. It uses a recently added if blade directive so you can also use stuff like elseadmin etc., (*6)
@admin
You are an admin.
@else
You are NOT an admin.
@endadmin
Admin accounts for Laravel apps
MIT
Admin accounts for Laravel apps
MIT