PHP code example of riley19280 / laravel-rules-to-schema
1. Go to this page and download the library: Download riley19280/laravel-rules-to-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/ */
riley19280 / laravel-rules-to-schema example snippets
use \Illuminate\Foundation\Http\FormRequest;
$schema = LaravelRulesToSchema::parse(FormRequest|array $rules): FluentSchema
$schema->compile(); // Returns an array representation of the json schema