From 33f44d42d284d6ea0a054de81ad5a57c3050867d Mon Sep 17 00:00:00 2001 From: Tushar Nain Date: Tue, 7 Oct 2025 17:29:34 +0530 Subject: [PATCH] feat: add __isset() method to Request for attribute existence check --- src/Utilities/Request.php | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/Utilities/Request.php b/src/Utilities/Request.php index fa305b32..c26d9102 100644 --- a/src/Utilities/Request.php +++ b/src/Utilities/Request.php @@ -24,6 +24,16 @@ public function __call($name, $arguments) } } + /** + * Determine if an attribute exists on the base request. + * + * @param string $name + */ + public function __isset($name): bool + { + return isset(request()->$name); + } + /** * Get attributes from request instance. *