Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/eklundkristoffer/administer
https://github.com/eklundkristoffer/administer
adminpanel laravel laravel-package laravel54
Last synced: 8 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/eklundkristoffer/administer
- Owner: eklundkristoffer
- Created: 2017-02-14T14:43:08.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2017-02-23T14:15:41.000Z (over 7 years ago)
- Last Synced: 2024-09-18T16:51:54.360Z (17 days ago)
- Topics: adminpanel, laravel, laravel-package, laravel54
- Language: CSS
- Size: 308 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
### Table of contents
* [Installation](#installation)
* [Users](#users)
* [Limits](#limits)
* [User Model](#user-model)
* [Authentication](#authentication)
* [Models](#models)
* [Editable Models](#editable-models)
* [Commands](#commands)
* [Add User Role](#add-user-role)
* [Delete User Role](#delete-user-role)###Installation
require the project using Composer:
```
composer require eklundkristoffer/administer
```or manually update your require block and run `composer update`
```
{
"require": {
"eklundkristoffer/administer": "~0.1"
}
}
```### Users
##### Limits
* Only eloquent driver is supported.
* Multiple guards is not supported.##### User model
Your user model should also be extending Administers own user model:
```php
namespace App\User;use Administer\Models\User as Administer;
class User extends Administer
{
//
}
```#### Authentication
If you want a administer to login using email for example, you will have to update `$username` property in your user model. Administer is using `username` and `password` fields on default.```php
namespace App\User;use Administer\Models\User as Administer;
class User extends Administer
{
/**
* Field to be used as username during authentication.
*
* @var string
*/
protected $username = 'username';/**
* Field to be used as password during authentication.
*
* @var string
*/
protected $password = 'password';
}
```### Models
##### Editable Models
By adding a model to the `models` array in `config/administer.php` Administer will then automatically let you edit the model records from the web. You can with ease define which fields that can be edited, and which fields that should be shown in the presentation list.
```php
'models' => [
App\User::class => [
'present_fields' => ['username', 'email'],
'editable_fields' => ['username', 'email']
]
],
```### Commands
##### Add User Role
```
php artisan administer:user:addrole {user_id} {roles*}
```
##### Delete User Role
```
php artisan administer:user:deleterole {user_id} {roles*}
```