Browse Source

Update ProfileController, add /i/me redirect

Daniel Supernault 6 years ago
parent
commit
c15cbe3fbb
1 changed files with 6 additions and 0 deletions
  1. 6 0
      app/Http/Controllers/ProfileController.php

+ 6 - 0
app/Http/Controllers/ProfileController.php

@@ -245,4 +245,10 @@ class ProfileController extends Controller
         }
         }
         return view('profile.following', compact('user', 'profile', 'following', 'owner', 'is_following', 'is_admin', 'settings'));
         return view('profile.following', compact('user', 'profile', 'following', 'owner', 'is_following', 'is_admin', 'settings'));
     }
     }
+
+    public function meRedirect()
+    {
+        abort_if(!Auth::check(), 404);
+        return redirect(Auth::user()->url());
+    }
 }
 }