PHP code example of shirokovnv / laravel-swagger

1. Go to this page and download the library: Download shirokovnv/laravel-swagger 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/ */

    

shirokovnv / laravel-swagger example snippets




namespace App\Http\Requests;

use Illuminate\Foundation\Http\FormRequest;

/**
 * @summary Updating of user
 *
 * @description
 *  This request mostly needed to specity flags <strong>free_comparison</strong> and
 *  <strong>all_cities_available</strong> of user
 *
 * @_204 Successful MF!
 */
class UpdateUserDataRequest extends FormRequest
{
    /**
     * Determine if the user is authorized to make this request.
     *
     * @return bool
     */
    public function authorize()
    {
        return true;
    }

    /**
     * Get the validation rules that apply to the request.
     *
     * @return array
     */
    public function rules()
    {
        return [
            'all_cities_available' => 'boolean',
            'free_comparison' => 'boolean'
        ];
    }
}