2018-04-02 07:02:12 +08:00
|
|
|
<?php
|
|
|
|
|
|
|
|
namespace App\Http\Requests;
|
|
|
|
|
|
|
|
use Illuminate\Foundation\Http\FormRequest;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Class CreateFilesRequest
|
|
|
|
*/
|
|
|
|
class UpdateFilesRequest extends FormRequest
|
|
|
|
{
|
|
|
|
/**
|
|
|
|
* Determine if the user is authorized to make this request.
|
2018-08-27 00:40:04 +08:00
|
|
|
*
|
2018-04-02 07:02:12 +08:00
|
|
|
* @return bool
|
|
|
|
*/
|
|
|
|
public function authorize(): bool
|
|
|
|
{
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Get the validation rules that apply to the request.
|
2018-08-27 00:40:04 +08:00
|
|
|
*
|
2018-04-02 07:02:12 +08:00
|
|
|
* @return array
|
|
|
|
*/
|
|
|
|
public function rules(): array
|
|
|
|
{
|
|
|
|
return [
|
|
|
|
'name' => 'required',
|
|
|
|
'file' => 'nullable|file',
|
|
|
|
|
2018-08-27 00:40:04 +08:00
|
|
|
//'files.*' => 'required|file',
|
2018-04-02 07:02:12 +08:00
|
|
|
];
|
|
|
|
}
|
|
|
|
}
|