38 lines
943 B
PHP
38 lines
943 B
PHP
<?php
|
|
|
|
namespace App\Http\Requests\Fo;
|
|
|
|
class SubmitWinningProofRequest extends RegisterRequest
|
|
{
|
|
/**
|
|
* Determine if the user is authorized to make this request.
|
|
*
|
|
* @return boolean
|
|
*/
|
|
public function authorize()
|
|
{
|
|
return auth('customer')->check();
|
|
}
|
|
|
|
/**
|
|
* Get the validation rules that apply to the request.
|
|
*
|
|
* @return array
|
|
*/
|
|
public function rules()
|
|
{
|
|
return \array_merge(\array_intersect_key(parent::rules(), [
|
|
'firstname' => '',
|
|
'lastname' => '',
|
|
'address' => '',
|
|
'postcode' => '',
|
|
'country' => '',
|
|
'city' => '',
|
|
'phone' => '',
|
|
]), [
|
|
'sticker' => 'required|mimes:jpeg,png,jpg,pdf|max:2048',
|
|
'ticket' => 'required|mimes:jpeg,png,jpg,pdf|max:2048',
|
|
'barcode' => 'required|mimes:jpeg,png,jpg,pdf|max:2048',
|
|
]);
|
|
}
|
|
}
|