From 0b44a736f31c7ce6da25210976ee6394878862a4 Mon Sep 17 00:00:00 2001 From: jolalau <89350183+jolalau@users.noreply.github.com> Date: Mon, 27 Nov 2023 20:29:08 +0800 Subject: [PATCH] Add files via upload Add isGet and isPost --- src/Http/Request.php | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/src/Http/Request.php b/src/Http/Request.php index 0690e97..86b807b 100644 --- a/src/Http/Request.php +++ b/src/Http/Request.php @@ -240,6 +240,24 @@ public function fullUrl(): string return '//' . $this->host() . $this->uri(); } + /** + * isGet + * @return bool + */ + public function isGet(): bool + { + return $this->method() == 'GET'; + } + + /** + * isPost + * @return bool + */ + public function isPost(): bool + { + return $this->method() == 'POST'; + } + /** * IsAjax * @return bool