42 lines
830 B
PHP
42 lines
830 B
PHP
<?php
|
|
|
|
namespace App\Http\Requests\Fo\Customers;
|
|
|
|
use Illuminate\Foundation\Http\FormRequest;
|
|
|
|
class ConfirmDeleteRequest extends FormRequest
|
|
{
|
|
/**
|
|
* Determine if the user is authorized to make this request.
|
|
*
|
|
* @return boolean
|
|
*/
|
|
public function authorize()
|
|
{
|
|
return auth('frontend')->check();
|
|
}
|
|
|
|
/**
|
|
* Get the validation rules that apply to the request.
|
|
*
|
|
* @return array
|
|
*/
|
|
public function rules()
|
|
{
|
|
return [
|
|
'confirm' => 'accepted'
|
|
];
|
|
}
|
|
|
|
/**
|
|
* Get custom messages for validator errors.
|
|
*
|
|
* @return array
|
|
*/
|
|
public function messages()
|
|
{
|
|
return [
|
|
'confirm.accepted' => trans('Pour supprimer votre compte vous devez cocher la case de confirmation.')
|
|
];
|
|
}
|
|
}
|