GithubHelp home page GithubHelp logo

abdallah-salama2 / laravel-admin-spatie-example Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 1.0 151 KB

This project provides a basic setup for using Spatie's Laravel Permissions and Roles package.

PHP 46.60% JavaScript 0.44% CSS 0.03% Blade 52.93%

laravel-admin-spatie-example's Introduction

Spatie Permission & Roles Basics

This project provides a basic setup for using Spatie's Laravel Permissions and Roles package. Preferable to use Admin account to see the features.

Getting Started

Before running the project, make sure to run the following commands to set up the database tables with sample data:

cd laravel-admin-spatie-example

composer install

cp .env.example .env

php artisan key:generate

php artisan migrate:fresh --seed

This will create some sample users with different roles and permissions.

Users with Roles and Permissions

Here are the email addresses and passwords for the sample users along with their corresponding roles and permissions:

  • Admin User:

    • Email: [email protected]
    • Password: password
    • Role: admin
    • Permissions: write post, publish post, edit post
  • Writer User:

    • Email: [email protected]
    • Password: password
    • Role: writer
    • Permissions: write post, publish post
  • Editor User:

  • Publisher User:

Feel free to log in with any of these users to explore the application.

Roles and Permissions Setup

In the seeding process, the following roles and permissions are created:

  • Roles:

    • admin
    • writer
    • editor
    • publisher
  • Permissions:

    • write post
    • edit post
    • publish post

Roles are assigned permissions as follows:

  • The admin role has permissions to write, publish, and edit posts.
  • The writer role has permissions to write and publish posts.
  • The editor role has permission to edit posts.
  • The publisher role has permission to publish posts.

laravel-admin-spatie-example's People

Contributors

abdallah-salama2 avatar

Watchers

 avatar

Forkers

bulentsakarya

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.