koel/app/Http/Requests/API/ProfileUpdateRequest.php
2017-06-04 02:30:45 +01:00

32 lines
584 B
PHP

<?php
namespace App\Http\Requests\API;
/**
* @property string password
*/
class ProfileUpdateRequest extends Request
{
/**
* Determine if the user is authorized to make this request.
*
* @return bool
*/
public function authorize()
{
return true;
}
/**
* Get the validation rules that apply to the request.
*
* @return array
*/
public function rules()
{
return [
'name' => 'required',
'email' => 'required|email|unique:users,email,'.auth()->user()->id,
];
}
}