• Stars
    star
    698
  • Rank 62,577 (Top 2 %)
  • Language
    PHP
  • License
    MIT License
  • Created about 8 years ago
  • Updated over 1 year ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Laravel Admin Panel

Laravel Admin Panel

An admin panel for managing users, roles, permissions & crud.

Requirements

Laravel >=5.5
PHP >= 7.0

Features

  • User, Role & Permission Manager
  • CRUD Generator
  • Activity Log
  • Page CRUD
  • Settings

Installation

  1. Run

    composer require appzcoder/laravel-admin
    
  2. Install the admin package.

    php artisan laravel-admin:install
    

    Service provider will be discovered automatically.

  3. Make sure your user model's has a HasRoles trait app/Models/User.php.

    class User extends Authenticatable
    {
        use Notifiable, HasRoles;
    
        ...
  4. You can generate CRUD easily through generator tool now.

Note: If you are using Laravel 7+ then scaffold the authentication with bootstrap for a better experience.

Usage

  1. Create some permissions.

  2. Create some roles.

  3. Assign permission(s) to role.

  4. Create user(s) with role.

  5. For checking authenticated user's role see below:

    // Add role middleware in app/Http/Kernel.php
    protected $routeMiddleware = [
        ...
        'role' => \App\Http\Middleware\CheckRole::class,
    ];
    // Check role anywhere
    if (Auth::check() && Auth::user()->hasRole('admin')) {
        // Do admin stuff here
    } else {
        // Do nothing
    }
    
    // Check role in route middleware
    Route::group(['namespace' => 'Admin', 'prefix' => 'admin', 'middleware' => ['auth', 'role:admin']], function () {
       Route::get('/', ['uses' => 'AdminController@index']);
    });
    
    // Check permission in route middleware
    Route::group(['namespace' => 'Admin', 'prefix' => 'admin', 'middleware' => ['auth', 'can:write_user']], function () {
       Route::get('/', ['uses' => 'AdminController@index']);
    });
  6. For checking permissions see below:

    if ($user->can('permission-name')) {
        // Do something
    }

Learn more about ACL from here

For activity log please read spatie/laravel-activitylog docs

Screenshots

users

activity log

generator

settings

Author

Sohel Amin 📧 Email Me

License

This project is licensed under the MIT License - see the License File for details

More Repositories

1

crud-generator

Laravel CRUD Generator
PHP
1,379
star
2

chatbot

An AI Based Chatbot [DEPRECATED]
Python
384
star
3

electron-vue-boilerplate

Electron & Vue.js Boilerplate
JavaScript
163
star
4

lumen-route-list

Lumen Route List
PHP
118
star
5

vue-example

Vue.js Examples
JavaScript
103
star
6

graphql-postgres-go

A GraphQL complete example using Golang & PostgreSQL
Go
70
star
7

aws-security-group-add-ip-action

GitHub Action for AWS Security Group Add IP
JavaScript
41
star
8

laravel-starter

Laravel Starter Project
PHP
19
star
9

my-docker

My Docker Environment
PHP
18
star
10

php-design-patterns

PHP Design Patterns Example
PHP
15
star
11

laravel-crud-generator

Laravel CRUD Generator
PHP
14
star
12

elk-stack

ELK Stack (Elasticsearch, Logstash & Kibana)
Shell
13
star
13

push-notification

Push Notification
JavaScript
9
star
14

laravel-package-boilerplate

Laravel Package Boilerplate
PHP
8
star
15

invoice.pdf

Invoice PDF Generator using dompdf
HTML
7
star
16

laravel-event-broadcast

Laravel event broadcasting with Node.js, Redis & Socket.io
CSS
6
star
17

docker-github-registry

A sample docker app for github package registry
JavaScript
6
star
18

webserver-setup

Automated shell script to setup web server on ubuntu or debian
Shell
6
star
19

microservices

A collection of some random microservices.
JavaScript
5
star
20

docker-swarm-example

Docker Swarm Example
JavaScript
5
star
21

machine-learning

My Machine Learning Notebook
Jupyter Notebook
4
star
22

express-example

Express.js example with MongoDB
HTML
4
star
23

js-framework

A small JavaScript Framework
JavaScript
4
star
24

safari-push-notification

Push notification implementation for safari browser
JavaScript
4
star
25

nodejs-circle-ci

JavaScript
3
star
26

popup-message

WordPress Popup Message Plugin
PHP
3
star
27

youtube-feed-2-wp-post

YouTube Video Feed Import to WP Post
PHP
3
star
28

iOS-sync

Synchronize iOS Devices (Alternative iTunes)
Python
3
star
29

package-boilerplate

PHP Package Boilerplate
PHP
3
star
30

node-boilerplate

Node JS Boilerplate
JavaScript
3
star
31

markdown-highlighter

Markdown Highlighter for WordPress
PHP
3
star
32

SSLCOMMERZ-API

SSLCOOMERZ Payment Gateway API
PHP
2
star
33

wp-list-table

WP List Table Example
PHP
2
star
34

kanban-react

Kanban task manager using React
JavaScript
2
star
35

youtube-json-api

YouTube JSON API
HTML
2
star
36

efk-stack

EFK Stack (Elasticsearch, Fluentd & Kibana)
Shell
1
star
37

go-practices

My Golang Practices Codes
Go
1
star
38

k8s-example

1
star
39

simple-jquery-ajax-file-uploader

A simple jquery ajax based file uploader
PHP
1
star