Laravel multiple roles with permission management system. SuperAdmin can able to manage other roles permissions. So, other roles can able access any module create, read, update and delete functionality on basis of permission given. using Spatie/laravel-permission package.
- PHP Version => 7.4 or higher
- Laravel Version => 8 or higher
- MySQL Version => 5.7 or higher
- Basic Laravel Auth: ability to log in with below Roles
- SuperAdmin (Can manage Products, Orders, Administrators, Members)
- Administrator ( Can manage Products, Orders, Members)
- Member (Can create multiple Order)
- Use database seeders to create SuperAdmin with email "superadmin@yopmail.com" and password "superadmin@123"
- Use database seeders to create Administrator with email "admin@yopmail.com" and password "admin@123"
- Use basic Laravel resource controllers with default methods - index, create, store, show etc.
- Product Module CRUD fields
- Product Name : [ Validation Rules : Accept only strings and space, Required ]
- Product Image : [ Validation Rules : Accept only png and jpg, Maximum 5 mb size, Required ]
- Product Description :
- Product Price : [ Validation Rules : Accept only double numbers, Required ]
- Product Stock/Qty : [ Validation Rules : Accept only numbers, Maximum lenght 9, Required ]
- Order Module CRUD fields
- Order Id :
- Multiple Product Select :
- Total Amount: [Auto Fetch price base on products selection]
- Use Laravel's migration scripts for database schema and tables related to further all operations
- Use Laravel's factory and seeders for sample dummy data creations where required
- Use Laravel's validation using Request classes where required
- Use Laravel's Eloquent and Relationships in models where required
- Use camel case for function name and variable name. E.g getProductDetails() , $categoryDetails
- Comment on the above function with short details of that function use or purpose of function creation.
- Reuse the common codes using some helper class functions etc
- Remove unnecessary code and debug points that are not needed
- Avoid unnecessary loops if not required
- Avoid unnecessary variable creations
- Use PHP design patterns where required Design Patterns
- Normalize database tables where required Database Normalization
- Optimize database tables
- Avoid MySQL joins queries if not required
- Avoid MySQL sub queries if it does not require
- For more information, please read the document Code Standard
- https://www.itsolutionstuff.com/post/laravel-10-user-roles-and-permissions-tutorialexample.html
- KEY : MULTIPERMISSION
- KEY : DATATABLE
- KEY : DYNAMICMULTIROW
- KEY : CHANGESTATUS
- KEY : FILTERSEARCH