1313use Fresns \WebsiteEngine \Exceptions \ErrorException ;
1414use Fresns \WebsiteEngine \Helpers \DataHelper ;
1515use Fresns \WebsiteEngine \Helpers \HttpHelper ;
16- use Illuminate \Http \JsonResponse ;
17- use Illuminate \Http \RedirectResponse ;
1816use Illuminate \Http \Request ;
1917use Illuminate \Support \Arr ;
2018use Illuminate \Support \Facades \Http ;
2422class ApiController extends Controller
2523{
2624 // make access token
27- public function makeAccessToken (): JsonResponse
25+ public function makeAccessToken ()
2826 {
2927 $ headers = Arr::except (HttpHelper::getHeaders (), ['Accept ' ]);
3028
@@ -40,7 +38,7 @@ public function makeAccessToken(): JsonResponse
4038 }
4139
4240 // api get
43- public function apiGet (Request $ request , string $ path ): JsonResponse
41+ public function apiGet (Request $ request , string $ path )
4442 {
4543 $ endpointPath = Str::of ($ path )->start ('/ ' )->toString ();
4644
@@ -97,7 +95,7 @@ public function apiGet(Request $request, string $path): JsonResponse
9795 }
9896
9997 // api post
100- public function apiPost (Request $ request , string $ path ): JsonResponse | RedirectResponse
98+ public function apiPost (Request $ request , string $ path )
10199 {
102100 $ endpointPath = Str::of ($ path )->start ('/ ' )->toString ();
103101
@@ -158,7 +156,7 @@ public function apiPost(Request $request, string $path): JsonResponse|RedirectRe
158156 }
159157
160158 // api put
161- public function apiPut (Request $ request , string $ path ): JsonResponse | RedirectResponse
159+ public function apiPut (Request $ request , string $ path )
162160 {
163161 $ endpointPath = Str::of ($ path )->start ('/ ' )->toString ();
164162
@@ -184,7 +182,7 @@ public function apiPut(Request $request, string $path): JsonResponse|RedirectRes
184182 }
185183
186184 // api patch
187- public function apiPatch (Request $ request , string $ path ): JsonResponse | RedirectResponse
185+ public function apiPatch (Request $ request , string $ path )
188186 {
189187 $ endpointPath = Str::of ($ path )->start ('/ ' )->toString ();
190188
@@ -221,7 +219,7 @@ public function apiPatch(Request $request, string $path): JsonResponse|RedirectR
221219 }
222220
223221 // api delete
224- public function apiDelete (Request $ request , string $ path ): JsonResponse | RedirectResponse
222+ public function apiDelete (Request $ request , string $ path )
225223 {
226224 $ endpointPath = Str::of ($ path )->start ('/ ' )->toString ();
227225
0 commit comments