Skip to content

Latest commit

 

History

History
69 lines (53 loc) · 1.64 KB

README.md

File metadata and controls

69 lines (53 loc) · 1.64 KB

laradmin

Just another Laravel admin package

Installation Steps

  1. Require this package with composer.
composer require shemi/laradmin
  1. Run the install artisan command
  • It published the assets, migrations, data and config files
php artisan laradmin:install
  1. Run migrate
php artisan migrate
  1. Make roles and permissions, run the following command
php artisan laradmin:roles
  1. Grant "Super Admin" role to a user, run the following command
php artisan laradmin:admin your@email.com

Roles and permissions

Laradmin uses the grate spatie/laravel-permission package for creating roles and permissions

Widgets

You can register widgets that will be displayed on the dashboard, to do so you need to register widgets at you AppServiceProvider.php

use Illuminate\Support\ServiceProvider;
use Laradmin;
use Shemi\Laradmin\Widgets\CounterWidget;
use Shemi\Laradmin\Widgets\LatestWidget;

class AppServiceProvider extends ServiceProvider
{
    public function boot(){...}

    public function register()
    {
        ...
        
        Laradmin::widrets()->registerRow([
            CounterWidget::start('users', 'Users', 'users', '#8c67ef'),
            CounterWidget::start('roles', 'Roles', 'hand-stop-o', '#ff3860'),
            CounterWidget::start('permissions', 'Permissions', 'check-square-o', '#23d160')
        ]);

        Laradmin::widrets()->registerRow([
            LatestWidget::start('users', null, ['id', 'updated_at', 'roles'])
        ]);
    }
}