yii\mongodb\file\Collection::delete PHP Method

delete() public method

Deletes the file with given _id.
public delete ( mixed $id ) : boolean
$id mixed _id of the file to find.
return boolean whether the operation was successful.
    public function delete($id)
    {
        $this->remove(['_id' => $id], ['limit' => 1]);
        return true;
    }