소스 검색

Update ProfileController, add /i/me redirect

Daniel Supernault 6 년 전
부모
커밋
c15cbe3fbb
1개의 변경된 파일6개의 추가작업 그리고 0개의 파일을 삭제
  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'));
     }
+
+    public function meRedirect()
+    {
+        abort_if(!Auth::check(), 404);
+        return redirect(Auth::user()->url());
+    }
 }