From c211fd9b1f5d16be639c4077b3e47c90f7cacded Mon Sep 17 00:00:00 2001 From: isaacclad Date: Thu, 11 Jun 2026 07:06:04 +0000 Subject: [PATCH] Add public product landing page at / Serve a marketing landing page at the site root via ProductLandingController instead of redirecting straight to login, with config/product_landing.php and product views. Co-Authored-By: Claude Opus 4.8 --- .../Controllers/ProductLandingController.php | 31 ++++++ config/product_landing.php | 43 ++++++++ resources/views/product/landing.blade.php | 101 ++++++++++++++++++ routes/web.php | 5 +- 4 files changed, 177 insertions(+), 3 deletions(-) create mode 100644 app/Http/Controllers/ProductLandingController.php create mode 100644 config/product_landing.php create mode 100644 resources/views/product/landing.blade.php diff --git a/app/Http/Controllers/ProductLandingController.php b/app/Http/Controllers/ProductLandingController.php new file mode 100644 index 0000000..6ab88dc --- /dev/null +++ b/app/Http/Controllers/ProductLandingController.php @@ -0,0 +1,31 @@ +session()->has('mb.email')) { + return redirect()->route($dashboardRoute); + } + + return view('product.landing'); + } + + if (auth()->check()) { + return redirect()->route($dashboardRoute); + } + + return view('product.landing'); + } +} diff --git a/config/product_landing.php b/config/product_landing.php new file mode 100644 index 0000000..d023083 --- /dev/null +++ b/config/product_landing.php @@ -0,0 +1,43 @@ + 'give', + 'name' => 'Give', + 'logo' => 'images/logo/ladillgive-logo.svg', + 'icon' => 'give.svg', + 'tagline' => 'Collect donations and member giving', + 'headline' => 'Online giving made simple', + 'accent' => 'donations, tithes, and campaigns', + 'description' => 'Give helps churches, NGOs, and communities collect donations online with branded giving pages and transparent payout tracking.', + 'benefits' => + [ + 0 => + [ + 'title' => 'Branded giving pages', + 'text' => 'Share a link or QR code so supporters can give in seconds.', + ,] + 1 => + [ + 'title' => 'Recurring & one-time', + 'text' => 'Support memberships, tithes, campaigns, and special offerings.', + ,] + 2 => + [ + 'title' => 'Secure payouts', + 'text' => 'Track every gift and reconcile payouts from your Ladill wallet.', + ,] + ,] + 'use_cases' => + [ + 0 => 'Churches & ministries', + 1 => 'NGOs & charities', + 2 => 'Community groups', + ,] + 'gradient_from' => '#007e7d', + 'gradient_to' => '#f6398a', + 'dashboard_route' => 'give.dashboard', + 'platform_url' => 'https://localhost', + 'marketing_url' => 'https://localhost/products/give', + 'register_url' => 'https://auth.localhost/register', + 'landing_variant' => 'default', +]; diff --git a/resources/views/product/landing.blade.php b/resources/views/product/landing.blade.php new file mode 100644 index 0000000..37bc63f --- /dev/null +++ b/resources/views/product/landing.blade.php @@ -0,0 +1,101 @@ +@php + $landing = (array) config('product_landing'); + $logo = (string) ($landing['logo'] ?? ''); + $logoPath = $logo !== '' ? public_path($logo) : null; + $platformUrl = (string) ($landing['platform_url'] ?? 'https://ladill.com'); + $marketingUrl = (string) ($landing['marketing_url'] ?? $platformUrl); + $signInUrl = route('sso.connect', [ + 'redirect' => route($landing['dashboard_route'] ?? 'login'), + 'interactive' => 1, + ]); + $variant = (string) ($landing['landing_variant'] ?? 'default'); +@endphp + + + + + + {{ $landing['name'] ?? config('app.name') }} — Ladill + + @include('partials.favicon') + + + + @vite(['resources/css/app.css']) + + +
+ +
+
+ @if ($logo !== '') + {{ $landing['name'] ?? config('app.name') }} + @else + {{ $landing['name'] ?? config('app.name') }} + @endif + +
+
+ +
+
+
+

{{ $landing['tagline'] ?? '' }}

+

{{ $landing['headline'] ?? ($landing['name'] ?? '') }}

+

{{ $landing['description'] ?? '' }}

+ + + +

+ Learn more on ladill.com +

+
+ +
+

Why {{ $landing['name'] ?? 'Ladill' }}

+
+ @foreach (($landing['benefits'] ?? []) as $benefit) +
+

{{ $benefit['title'] }}

+

{{ $benefit['text'] }}

+
+ @endforeach +
+ + @if (! empty($landing['use_cases'])) +
+

Ideal for

+
+ @foreach ($landing['use_cases'] as $useCase) + {{ $useCase }} + @endforeach +
+
+ @endif +
+
+
+ +
+ Part of the Ladill platform — one account for every app. +
+ + diff --git a/routes/web.php b/routes/web.php index 0f63748..30116c1 100644 --- a/routes/web.php +++ b/routes/web.php @@ -1,5 +1,6 @@ auth()->check() - ? redirect()->route('give.dashboard') - : redirect()->route('sso.connect'))->name('give.root'); +Route::get('/', [ProductLandingController::class, 'show'])->name('give.landing'); Route::get('/login', [SsoLoginController::class, 'connect'])->name('login'); Route::get('/sso/connect', [SsoLoginController::class, 'connect'])->name('sso.connect');