Browse Source

use host

am
farhan 4 months ago
parent
commit
aaadac9d26
1 changed files with 3 additions and 3 deletions
  1. 3
    3
      app/Http/Controllers/MainController.php

+ 3
- 3
app/Http/Controllers/MainController.php View File

12
         $rsvp = RSVP::all();
12
         $rsvp = RSVP::all();
13
         $guestbook = GuestBook::all();
13
         $guestbook = GuestBook::all();
14
 
14
 
15
-        $currentUrl = $request->fullUrl();
16
-        if ($currentUrl == 'https://aliffayuna.com/') {
15
+        $host = $request->getHost();
16
+        if ($host == 'aliffayuna.com') {
17
             return view('digital-card', compact(['rsvp', 'guestbook']));
17
             return view('digital-card', compact(['rsvp', 'guestbook']));
18
         }
18
         }
19
 
19
 
20
-        if ($currentUrl == 'https://rsvp.aliffayuna.com/') {
20
+        if ($host == 'rsvp.aliffayuna.com') {
21
             return view('rsvp-digital-card');
21
             return view('rsvp-digital-card');
22
         }
22
         }
23
     }
23
     }

Loading…
Cancel
Save