diff --git a/resources/views/auth/login.blade.php b/resources/views/auth/login.blade.php index e83111b..293aab4 100644 --- a/resources/views/auth/login.blade.php +++ b/resources/views/auth/login.blade.php @@ -12,12 +12,12 @@
diff --git a/routes/web.php b/routes/web.php index a75b586..9811688 100644 --- a/routes/web.php +++ b/routes/web.php @@ -96,8 +96,18 @@ if ($response->successful()) { $preachers = $response['data']; } - // dd($response->json()); - return view('sermons', ['sermons' => $sermons, 'preachers' => $preachers, 'pagination' => $pagination]); + + $url = config('app.api_path') . 'services/all'; + $services = []; + $response = Http::timeout(200) + ->withHeaders(['X-Requested-With' => 'XMLHttpRequest']) + ->get($url); + + if ($response->successful()) { + $services = $response['data']; + } + + return view('sermons', ['sermons' => $sermons, 'preachers' => $preachers, 'pagination' => $pagination, 'services' => $services]); })->name('sermons');