This endpoint requires an active authenticated session. Unauthenticated requests are redirected to the login page.
Endpoint
Description
Permanently removes a task record from the database usingfindOrFail. If the task does not exist, Laravel returns a 404 response automatically.
Path parameters
integer
required
The unique identifier of the task to delete.
Response
Returns a JSON object confirming deletion.Response fields
string
A confirmation string. Value:
"Task deleted successfully"Example response
200
Error response
If no task with the givenid exists, Laravel’s findOrFail throws a ModelNotFoundException and returns:
404