Skip to content

Controller

isDelete()

isDelete() — returns boolean

Available in: controller Category: Miscellaneous Functions

Returns whether the request was a DELETE request or not.

// 1. Only process delete logic when the request method is DELETE
if (isDelete()) {
    // perform delete operation
}

// 2. Assign the result to a variable for later use
requestIsDelete = isDelete();