From ba63a6030b20ec1af5ca8cb395dd0793ed2de70d Mon Sep 17 00:00:00 2001 From: Amir Date: Mon, 5 Jul 2021 12:49:22 +0430 Subject: [PATCH] bug fix --- src/Request.php | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/src/Request.php b/src/Request.php index 8c85720..6bd5e16 100644 --- a/src/Request.php +++ b/src/Request.php @@ -63,11 +63,23 @@ public function except(array $keys): mixed public function url(): string { - return '//' . $this->host() . $this->path(); + if (env("APP_SSL", false) == true) { + $protocol = 'https://'; + } else { + $protocol = 'http://'; + } + + return $protocol . $this->host() . $this->path(); } public function fullUrl(): string { - return '//' . $this->host() . $this->uri(); + if (env("APP_SSL", false) == true) { + $protocol = 'https://'; + } else { + $protocol = 'http://'; + } + + return $protocol . $this->host() . $this->uri(); } }