FleetCart/Modules/Import/Http/Requests/StoreImporterRequest.php

30 lines
630 B
PHP
Raw Normal View History

2023-06-11 12:14:03 +00:00
<?php
namespace Modules\Import\Http\Requests;
use Illuminate\Validation\Rule;
use Modules\Core\Http\Requests\Request;
class StoreImporterRequest extends Request
{
/**
* Available attributes.
*
* @var string
*/
protected $availableAttributes = 'import::attributes';
/**
* Get the validation rules that apply to the request.
*
* @return array
*/
public function rules()
{
return [
'import_type' => ['required', Rule::in(['product'])],
'csv_file' => ['required', 'file', 'mimes:csv,txt'],
];
}
}