logo

English

Delete Documents

$lableb->delete( $collection, $id )
  1. $collection: collection name you want to delete the document from.
  2. $id: ID of the document to be deleted.
Example:
try
{
  $response = $lableb->delete( 'posts', 1 );
}
catch( \Lableb\LablebException $e )
{
  echo $e->getMessage();
}

Example response:
[
  'deleted' => true,
  'message' => 'Document with ID of 1 has been deleted'
]