Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/skn-036/cms-role-permission-laravel-vue-spa
This repository uses PHP Laravel and Javascript Vue.js frameworks to implement Role Permissions management in CMS. Cookie based SPA authorization feature of Laravel Sanctum package is used to authorize the user inside the content management system. If a logged user has permission to do specific task, the link to visit the task and the page containing the task will be available to the logged user. Otherwise the page will be unavailable to the logged user with 401 unauthorized error even though try to access the route manually. This repo utilizes the SPA feature of Vue.js.
https://github.com/skn-036/cms-role-permission-laravel-vue-spa
laravel laravel-sanctum laravel-sanctum-cookie laravel-sanctum-spa laravel10 laravel10-crud pinia pinia-vuejs role-permissions sanctum-authentication sanctum-spa sanctum-vue vue vue-resource vue-router vue-suspense vue3 vue3-composition-api vuejs vuex
Last synced: 3 months ago
JSON representation
This repository uses PHP Laravel and Javascript Vue.js frameworks to implement Role Permissions management in CMS. Cookie based SPA authorization feature of Laravel Sanctum package is used to authorize the user inside the content management system. If a logged user has permission to do specific task, the link to visit the task and the page containing the task will be available to the logged user. Otherwise the page will be unavailable to the logged user with 401 unauthorized error even though try to access the route manually. This repo utilizes the SPA feature of Vue.js.
- Host: GitHub
- URL: https://github.com/skn-036/cms-role-permission-laravel-vue-spa
- Owner: skn-036
- Created: 2021-05-15T19:15:59.000Z (over 3 years ago)
- Default Branch: master
- Last Pushed: 2024-01-27T06:46:20.000Z (11 months ago)
- Last Synced: 2024-09-28T20:03:01.682Z (3 months ago)
- Topics: laravel, laravel-sanctum, laravel-sanctum-cookie, laravel-sanctum-spa, laravel10, laravel10-crud, pinia, pinia-vuejs, role-permissions, sanctum-authentication, sanctum-spa, sanctum-vue, vue, vue-resource, vue-router, vue-suspense, vue3, vue3-composition-api, vuejs, vuex
- Language: PHP
- Homepage:
- Size: 1.13 MB
- Stars: 27
- Watchers: 1
- Forks: 15
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
## About This Repository
This repository uses PHP Laravel version 10, Javascript Vue.js version 3 and Tailwind css frameworks to implement Role Permissions management in CMS. Vite is used to compile the frontend assets. Cookie based SPA authorization feature of Laravel Sanctum package is used to authorize the user inside the content management system. Vue router is used to handle the routing and Pinia is used as the frontend store management system. If a logged user has permission to do specific task, the link to visit the task and the page containing the task will be available to the logged user. Otherwise the page will be unavailable to the logged user with 401 unauthorized error even though try to access the route manually. Though some actions are visible on the frontend for better user experience, but it will handled on the backend and shows a error toast with relevant error message as well as permission requirements. This repo utilizes the SPA feature of Vue.js.
## Logging In
Following credentials can be used to log in the system
Sl
Role
Email Address
Password
01
Super Admin
[email protected]
password
02
Admin
[email protected]
password
03
Author
[email protected]
password
04
Editor
[email protected]
password
05
User
[email protected]
password
06
User
[email protected]
password
07
User
[email protected]
password
08
User
[email protected]
password
09
User
[email protected]
password
Initailly only Super Admin is granted all the permissions. All other role has no permissions. To add permissions to any other role, first log in as super admin, then go to the roles page. Assign necessary permissions to the role. Then come to the users page and update users roles. One user can have multiple roles. Overall user permissions will be the collection of all roles permissions combined. Super admin role is readonly(can not be edited or deleted). This role can not be applied to any other user. If a new permission is created, updated or deleted, it will be automatically applied to super admin.
## Installation
First download this repository. Navigate to root of the project and then
composer install
npm install
Copy the contents of .env.example to .env file. Fill up the database credentials(DB_DATABASE, DB_USERNAME, DB_PASSWORD) according to your database. At the root of your project run the following commands on terminal sequentially.
php artisan key:generate
php artisan migrate
php artisan db:seed
This will store all the default data into the database. Then compile the assets and run development server by
npm run dev
Finally initiate your server on a new terminal and enjoy !!!
php artisan serve