<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
tenantcloud / laravel-auto-generate-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'
];
}
}
namespace App\Http\Controllers;
use App\Http\Requests\UpdateRequest;
class UpdateController
{
/**
* @tag json-api
* @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!
*/
public function update(int $id, UpdateRequest $request)
{
//...
}
}
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.