PHP code example of cognesy / instructor-dynamic

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

    

cognesy / instructor-dynamic example snippets


use Cognesy\Dynamic\Structure;
use Cognesy\Schema\SchemaBuilder;

$schema = SchemaBuilder::define('search_args')
    ->string('query')
    ->int('limit', / true
$updated->toArray();             // ['query' => 'laravel', 'limit' => 10]