From c5bd054063d2f34eab1a66ca893b08d8f53e4561 Mon Sep 17 00:00:00 2001 From: Amir Date: Fri, 12 Jul 2024 17:17:03 +0330 Subject: [PATCH] fix response in all files --- src/Commands/Build/Middleware.php | 4 ++-- src/Resource/JsonResource.php | 5 ++--- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/src/Commands/Build/Middleware.php b/src/Commands/Build/Middleware.php index a422f3e..364087b 100644 --- a/src/Commands/Build/Middleware.php +++ b/src/Commands/Build/Middleware.php @@ -47,8 +47,8 @@ protected function execute(InputInterface $input, OutputInterface $output): int \file_put_contents( appPath("Middlewares/$classPath/$className.php") , $classNamespace == '' - ? "success('middleware created successfully' , true); diff --git a/src/Resource/JsonResource.php b/src/Resource/JsonResource.php index 0d6c883..cb816e3 100644 --- a/src/Resource/JsonResource.php +++ b/src/Resource/JsonResource.php @@ -2,7 +2,6 @@ namespace Fomo\Resource; -use Fomo\Response\Response; use Illuminate\Contracts\Pagination\Paginator; use Illuminate\Support\Collection; use stdClass; @@ -53,7 +52,7 @@ protected function arrayToCollection(array $data): Collection return $collection; } - public function collection(): Response + public function collection(): string { $this->process(); @@ -74,7 +73,7 @@ public function collection(): Response ]); } - public function single(): Response + public function single(): string { if (is_null($this->data)){ return response()->json([