wyyl/beike/Admin/Http/Requests/UploadRequest.php

40 lines
799 B
PHP

<?php
/**
* UploadRequest.php
*
* @copyright 2022 beikeshop.com - All Rights Reserved
* @link https://beikeshop.com
* @author Edward Yang <yangjin@guangda.work>
* @created 2022-07-22 14:51:27
* @modified 2022-07-22 14:51:27
*/
namespace Beike\Admin\Http\Requests;
use Illuminate\Foundation\Http\FormRequest;
class UploadRequest 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 [
'file' => 'required|mimes:jpg,png,jpeg,gif,svg,mp4|max:20480',
];
}
}