40 lines
1.1 KiB
PHP
40 lines
1.1 KiB
PHP
<?php
|
|
|
|
namespace App\Http\Requests\Fo;
|
|
|
|
use Illuminate\Foundation\Http\FormRequest;
|
|
|
|
class SubmitWinningProof extends FormRequest
|
|
{
|
|
/**
|
|
* 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 [
|
|
'lastname' => 'required|string|max:255',
|
|
'firstname' => 'required|string|max:255',
|
|
'address' => 'required|string|max:255',
|
|
'address2' => 'nullable|string|max:255',
|
|
'town' => 'required|string|max:255',
|
|
'postal_code' => 'required|max:255',
|
|
'country' => 'required|string|max:255',
|
|
'phone' => 'required|string|max:50',
|
|
'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',
|
|
];
|
|
}
|
|
}
|