user(); return auth()->check() && $user->isAdmin(); } /** * Get the validation rules that apply to the request. * * @return array */ public function rules(): array { /** @var \App\Models\User */ $user = auth()->user(); return [ 'message' => 'required|min:' . ($user->isAdmin() ? '5' : '20'), ]; } }