-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Added delete route #2
base: master
Are you sure you want to change the base?
Conversation
Edit DatabaseSeeder.php to seed all tables Create Factories for all tables
add comments to database models
…d array of objects. Move Controller logic from Model
Add getAllComplaints Method in ComplaintController.php Add getAllComplaints Method in Complaint.php Model Add Comments
app/Complaint.php
Outdated
} | ||
|
||
} | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why so many empty lines? Have at max of one extra lines.
/** | ||
* By using the ID of complaint given by user, the function deletes the complaint, complaintComment | ||
* and complaintStatus from the Complaint, ComplaintComment and ComplaintStatus tables respectively | ||
*@param $id |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add a space before @param
*/ | ||
|
||
public function deleteComplaint(Request $request){ | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Indentations...
|
||
|
||
if(! $userID) | ||
return response()->json([ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
indentation
], 403); | ||
|
||
if(! $isUserAdmin) | ||
return response()->json([ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
indentation
delete route and delete functions have been added