2022-03-15 16:27:41 +01:00
|
|
|
<?php
|
|
|
|
|
|
|
|
|
|
namespace App\Http\Requests\Fo;
|
|
|
|
|
|
2022-03-18 14:42:11 +01:00
|
|
|
class SubmitWinningProofRequest extends RegisterRequest
|
2022-03-15 16:27:41 +01:00
|
|
|
{
|
|
|
|
|
/**
|
|
|
|
|
* 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()
|
|
|
|
|
{
|
2022-03-18 14:42:11 +01:00
|
|
|
return \array_merge(\array_intersect_key(parent::rules(), [
|
|
|
|
|
'firstname' => '',
|
|
|
|
|
'lastname' => '',
|
|
|
|
|
'address' => '',
|
|
|
|
|
'postcode' => '',
|
|
|
|
|
'country' => '',
|
|
|
|
|
'city' => '',
|
|
|
|
|
'phone' => '',
|
|
|
|
|
]), [
|
2022-03-15 16:27:41 +01:00
|
|
|
'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',
|
2022-03-18 14:42:11 +01:00
|
|
|
]);
|
2022-03-15 16:27:41 +01:00
|
|
|
}
|
|
|
|
|
}
|