PHP code example of adelf / ventriloquist

1. Go to this page and download the library: Download adelf/ventriloquist 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/ */

    

adelf / ventriloquist example snippets


  array (
    0 => 
    array (
      'name' => 'name',
    ),
    1 => 
    array (
      'name' => 'last_name',
    ),
    2 => 
    array (
      'name' => 'salary',
    ),
    3 => 
    array (
      'name' => 'email',
    ),
    4 => 
    array (
      'name' => 'vacation',
      'select' => 
      array (
        0 => 'id',
        1 => 'start_date',
        2 => 
        array (
          'name' => 'allowance',
          'select' => 
          array (
            0 => 'id',
          ),
        ),
      ),
    )

$parser = new Generator();
$parser->query($arrayQuery);
$parser->rootModel(new \My\Root\Model());
$parsed = $parser->parse();

return $parsed->eloquentBuilder()->limit(10)->get();