PHP code example of aharisu / generate-form-request-phpdoc

1. Go to this page and download the library: Download aharisu/generate-form-request-phpdoc 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/ */

    

aharisu / generate-form-request-phpdoc example snippets




namespace App\Http\Requests;

use Illuminate\Foundation\Http\FormRequest;

class FooRequest extends FormRequest
{
    public function rules()
    {
        return [
            'id' => ["ullable", "boolean"],
            'json_value' => ["ame' => ["

namespace App\Http\Requests {
/**
 * @property-read int $id
 * @property-read ?int $int_value
 * @property-read int|float $numeric_value
 * @property-read string $string_value
 * @property-read ?bool $bool_value
 * @property-read mixed $json_value
 * @property-read string[] $indexed_array
 * @property-read ?array{id: int, name: string, thumbnail: ?\Illuminate\Http\UploadedFile} $shaped_array
 */
class FooRequest extends \Illuminate\Foundation\Http\FormRequest {}
}
bash
php artisan form-request:generate
bash
php artisan form-request:generate App\Http\Requests\FooRequest
bash
php artisan form-request:generate app/Http/Requests/FooRequest.php
bash
php artisan form-request:generate App\Http\Requests\FooRequest app/Http/Requests/BarRequest.php
bash
php artisan vendor:publish --provider="aharisu\GenerateFormRequestPHPDoc\GenerateFormRequestPhpdocServiceProvider"