浏览代码

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());
+    }
 }