mirror of
https://github.com/koel/koel
synced 2024-12-20 01:23:16 +00:00
22 lines
409 B
PHP
22 lines
409 B
PHP
<?php
|
|
|
|
namespace App\Http\Requests\API;
|
|
|
|
/**
|
|
* @property string password
|
|
*/
|
|
class UserUpdateRequest extends Request
|
|
{
|
|
public function authorize(): bool
|
|
{
|
|
return auth()->user()->is_admin;
|
|
}
|
|
|
|
public function rules(): array
|
|
{
|
|
return [
|
|
'name' => 'required',
|
|
'email' => 'required|email|unique:users,email,'.$this->route('user')->id,
|
|
];
|
|
}
|
|
}
|