PHP code example of moussaclarke / planar

1. Go to this page and download the library: Download moussaclarke/planar library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

moussaclarke / planar example snippets


$data = [
    'name' => 'foobar',
    'price' => 5,
    'weight' => 10,
    'subwidget' => ['foo' => 'bar', 'bar' => 'foo']
];
$id = $widgets->add($data);

$widgets->set('57d1d2fc97aee', $data);

$result = $widgets->first('_id', '57d1d2fc97aee');

$result = $widgets->all('price');

$result = $widgets->search('foo');

if ($widgets->delete('57d1d2fc97aee')) {
    echo 'Document succesfully deleted';
} else {
    echo 'Document not found';
}