phpvms/app/Http/Requests/ImportRequest.php
Nabeel S 45873431e4
Add public/private pages #641 (#644)
* Add public/private pages #641

* Cleanup the form requests
2020-03-28 13:03:52 -04:00

32 lines
594 B
PHP

<?php
namespace App\Http\Requests;
use App\Contracts\FormRequest;
use Illuminate\Http\Request;
/**
* Validate that the files are imported
*/
class ImportRequest extends FormRequest
{
public static $rules = [
'csv_file' => 'required|file',
];
/**
* @param Request $request
*
* @throws \Illuminate\Validation\ValidationException
*/
public static function validate(Request $request)
{
\Validator::make($request->all(), static::$rules)->validate();
}
public function rules(): array
{
return static::$rules;
}
}