DiveLogController::destroy(). The delete is a soft delete: the row stays in the database with deleted_at set, and from that moment the dive log no longer exists for the API (see Notes). After the delete the diver's remaining dive logs are renumbered.is_signed = true) cannot be deleted, not even by its owner.App\Http\Controllers\Api\V1\Diver\DiveLogController::destroy()api.v1.diver.dive-logs.destroyAuthorization: Bearer {token}DiveLogPolicy::deleteOwn(), which no role bypasses: an administrator token cannot delete a dive log that is not its own.DELETE/api/v1/diver/dive-logs/{diveLog}| Parameter | Type | Description |
|---|---|---|
{diveLog} | integer | Dive log primary key, route-model-bound |
200 OK{
"success": true,
"status": "success",
"message": "Dive log deleted successfully"
}data key: the envelope omits it when there is nothing to return.401 Unauthorized{
"success": false,
"status": "error",
"message": "Unauthenticated"
}403 Forbidden — not the owner, or the dive log is signed403 of PATCH_update.md).{
"success": false,
"status": "error",
"message": "Forbidden"
}404 Not Found{
"message": "No query results for model [App\\Models\\Users\\DiveLog] 671996"
}deleted_at on the DiveLog row, then calls DiveLog::reorder($user), which renumbers every remaining dive log of the diver by date. The number of later dive logs therefore changes after a delete.404 on GET /api/v1/diver/dive-logs/{diveLog}, PATCH /api/v1/diver/dive-logs/{diveLog} and a second DELETE, and is no longer listed by GET /api/v1/diver/dive-logs.docs/api/diver/dive-logs/DELETE_destroy.mdcurl --location --request DELETE 'https://test.diveraid.com/api/v1/diver/dive-logs/' \
--header 'Authorization: Bearer <token>'{
"status": "success",
"message": "string",
"data": null
}