PHP code example of waleedhu / rules-to-schema
1. Go to this page and download the library: Download waleedhu/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/ */
waleedhu / rules-to-schema example snippets
use WaleedHu\RulesToSchema\RuleSchema;
$schema = RuleSchema::fromRules([
'title' => 'ring|max:50',
'author.email' => '
]);
RuleSchema::fromRules((new StorePostRequest)->rules());
RuleSchema::fromRules([
'attachments' => 'array',
'attachments.*.url' => '