Just another Laravel admin package
- Require this package with composer.
composer require shemi/laradmin
- Run the install artisan command
- It published the assets, migrations, data and config files
php artisan laradmin:install
- Run migrate
php artisan migrate
- Make roles and permissions, run the following command
php artisan laradmin:roles
- Grant "Super Admin" role to a user, run the following command
php artisan laradmin:admin your@email.com
Laradmin uses the grate spatie/laravel-permission package for creating roles and permissions
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'])
]);
}
}