2018-11-11 00:24:36 +11:00
|
|
|
<?php
|
|
|
|
|
|
|
|
|
|
namespace App\Http\Requests\Client;
|
|
|
|
|
|
|
|
|
|
use App\Http\Requests\Request;
|
|
|
|
|
|
|
|
|
|
class UpdateClientRequest extends Request
|
|
|
|
|
{
|
|
|
|
|
/**
|
|
|
|
|
* Determine if the user is authorized to make this request.
|
|
|
|
|
*
|
|
|
|
|
* @return bool
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
public function authorize()
|
|
|
|
|
{
|
|
|
|
|
return true;
|
|
|
|
|
// return ! auth()->user(); //todo permissions
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public function rules()
|
|
|
|
|
|
|
|
|
|
{
|
|
|
|
|
return [
|
|
|
|
|
'name' => 'required',
|
2018-11-27 17:59:16 +11:00
|
|
|
'contacts.*.email' => 'email|unique:client_contacts,id'
|
2018-11-11 00:24:36 +11:00
|
|
|
];
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|