1. Go to this page and download the library: Download sentinelphp/schema 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/ */
sentinelphp / schema example snippets
use SentinelPHP\Schema\Generator;
use SentinelPHP\Schema\Config\GeneratorConfig;
$generator = new Generator();
$data = [
'id' => 123,
'name' => 'John Doe',
'email' => '[email protected]',
'created_at' => '2024-01-15T10:30:00Z',
];
$schema = $generator->generate($data);
// Returns JSON Schema with inferred types and formats