File "UpdateRequest.php"
Full Path: /home/isoftco/public_html/hrm/app/Http/Requests/Admin/SuperAdminUser/UpdateRequest.php
File size: 681 bytes
MIME-type: text/x-php
Charset: utf-8
<?php
namespace App\Http\Requests\Admin\SuperAdminUser;
use App\Http\Requests\AdminCoreRequest;
class UpdateRequest extends AdminCoreRequest
{
/**
* Determine if the user is authorized to make this request.
*
* @return bool
*/
public function authorize()
{
return admin()->type === 'superadmin';
}
/**
* Get the validation rules that apply to the request.
*
* @return array
*/
public function rules()
{
return [
'name' => 'required',
'email' => 'required|email|unique:admins,email,'.$this->superadmin_user,
'password' => 'confirmed',
];
}
}