Navigation X
ALERT
Click here to register with a few steps and explore all our cool stuff we have to offer!

cracked.io | Best Forum Around | Free Premium Accounts




 1611

laravel tutorial Implement CRUD with Laravel Service-Repository Pattern pls help me

by quangle70 - 19 January, 2022 - 05:57 AM
This post is by a banned member (quangle70) - Unhide
quangle70  
Registered
21
Posts
11
Threads
2 Years of service
#1
(This post was last modified: 19 January, 2022 - 06:06 AM by quangle70. Edited 1 time in total.)
Target:
Create CRUD application with Laravel.
Understand the structure and flow of Laravel operations.
Group work management.
Content:

I. General requirements

Build an environment to run Laravel using Laradock.
Making a project using Laravel.
Use Trello to manage tasks.
II. Technical requirements for the project practice
Apply Gitflow, Git's Workflow.
100% feature testing.
Apply Ajax in combination with bootstrap Modal in CRUD.
Apply MVC model combining Repository + Service (5 layers) Reference link.
There are at least 2 Resource 1-n or n-n relations.
Use Form Request Validation.
Create a new Custom Validation Rules.
Create a new Middleware (other than auth middleware) and apply it in another route.
Use scope with search functions.
Project has search function (use scope to write a search query).
Apply the PSR2 rule in the code, use the PHP CodeSniffer package to check the code in the project.
Apply Ajax Best Practice.
Apply Event Handling.
Apply Jquery Best Practice
Apply Laravel Best Practice
III. require function

 1. Interface (optional)

Available admin templates can be used.

 2. Functions:

No. Function Technical requirements
1 Create a role management function and Create a permission initialization seed, with a search role function Create a CRUD role function, and initialize data in the permission table using the seed. Using n-n relationship with 2 tables roles and permissions
2 Authenticate function Full function: login, register, logout.
3 Create user management function There is CRUD user function, and 1 user has many roles(n-n)
4 Create Category management function There is CRUD category function, 1 category has n categories, 1 category belongs to 1.0 category(1-n)
5 Create a product management function Use Ajax to create CRUD ajax functionality. There is image processing. 1 product belongs to 1 or n category(n-n), use Laravel Image Intervention to process the image, and create a Trait named HandleImage to process the image.
6 Authorize Use blade if to assign permissions to elements in the view, use middleware to authorize routes, use gate or policy to assign permissions to the super-admin role
7 Search user by name and email, by role Use local scope to create query for search function
8 Customrule Use at least 1 custom rule to validate the above CRUD functions
9 Function to search product by category name, and by name, product price There is function to search product by multi option, use where has to create query and scope.
10 Use accessor to create image path for product For example, in the db store the image as test.jpg and in the folder images/upload. Use accessor to create image path as folder_name/image_name
 

Some note:

Must have an account as super-admin (full rights do not need to assign any permissions)
Products and categories have an n-n . relationship
Roles and users have an n-n . relationship
Role permissions have an n-n . relationship
Category and Category are related (1-n) (multi-level menu)
This post is by a banned member (the_chi3f1) - Unhide
50
Posts
1
Threads
3 Years of service
#2
Message me on telegram @the_chi3f17

Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
or
Sign in
Already have an account? Sign in here.


Forum Jump:


Users browsing this thread: 1 Guest(s)