2017 © Pedro Peláez
 

library laravel-admin

A very simple admin panel for managing users, roles & permissions.

image

jamesmills/laravel-admin

A very simple admin panel for managing users, roles & permissions.

  • Wednesday, June 20, 2018
  • by jamesmills
  • Repository
  • 1 Watchers
  • 19 Stars
  • 87 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 1 Forks
  • 0 Open issues
  • 4 Versions
  • 0 % Grown

The README.md

Laravel Admin Starter

Packagist Packagist, (*1)

A very simple admin panel for managing users, roles & permissions., (*2)

The premise for this package is to eradicate the duplicate work I do for every new Laravel project I setup., (*3)

You will get a default user who has the role of admin. You will be able to log into the system with this user and manage all roles and permissions using a simple Bootstrap UI. The default yourapp.local/admin route will be restricted to users with admin role only. You will get a good default to build your application views and backend views separately., (*4)

Installation

Note: This package should be run as soon as you have created a new laravel project., (*5)

  1. Run composer require jamesmills/laravel-admin
  2. Install the admin package. php artisan laravel-admin:install

What this packages does

  • Install the below packages
  • Run a migration
    • Create tables for roles, role_user, permissions, permission_role
  • Create a new user Admin User (admin@domain.com) with the password p455word
  • Publish the Laravel Auth view files using 'php artisan make:auth'
  • Publish some additional view/template files
    • All CRUD view files for users, roles and permissions
    • A dedicated backend template resources/views/templates/backend.blade.php
  • Replace the AuthServiceProvider class with a new version
  • Replace the web routes file with a new version
  • Replaces the User model with a new version so that it has the HasRoles trail reference

Roles & Permissions

  1. Create some roles.
  2. Create some permissions.
  3. Give permission(s) to a role.
  4. Create user(s) with role.
  5. For checking authenticated user's role see below: php // Check role anywhere if (auth()->check() && auth()->user()->hasRole('admin')) { // Do admin stuff here }
  6. For checking permissions see below: php if ($user->can('permission-name')) { // Do something }

Learn more about ACL from here, (*6)

Acknowledgements

The origin of this package is a fork from appzcoder/laravel-admin by Sohel Amin., (*7)

Note: I cloned the original project and created this so that I could remove the CRUD stuff., (*8)

The Versions

20/06 2018

dev-master

9999999-dev

A very simple admin panel for managing users, roles & permissions.

  Sources   Download

MIT

The Requires

 

laravel admin laravel admin laravel permissions laravel roles

20/06 2018

1.0.2

1.0.2.0

A very simple admin panel for managing users, roles & permissions.

  Sources   Download

MIT

The Requires

 

laravel admin laravel admin laravel permissions laravel roles

20/06 2018

1.0.1

1.0.1.0

A very simple admin panel for managing users, roles & permissions.

  Sources   Download

MIT

The Requires

 

laravel admin laravel admin laravel permissions laravel roles

20/06 2018

1.0.0

1.0.0.0

A very simple admin panel for managing users, roles & permissions.

  Sources   Download

MIT

The Requires

 

laravel admin laravel admin laravel permissions laravel roles