user()->isAdmin(); } public function rules(): array { $userId = $this->route('user')->id; return [ 'email' => ['required', 'email', 'max:255', Rule::unique('users', 'email')->ignore($userId)], 'justification'=> ['nullable', 'string', 'max:500'], ]; } public function attributes(): array { return [ 'email' => 'E-mel baru', 'justification' => 'Justifikasi', ]; } }