浏览代码

Update RelationshipSettings Controller, fixes #1605

Daniel Supernault 5 年之前
父节点
当前提交
4d2da2f1b0
共有 1 个文件被更改,包括 1 次插入5 次删除
  1. 1 5
      app/Http/Controllers/Settings/RelationshipSettings.php

+ 1 - 5
app/Http/Controllers/Settings/RelationshipSettings.php

@@ -22,7 +22,7 @@ trait RelationshipSettings
 			'mode' => 'nullable|string|in:following,followers,hashtags'
 			'mode' => 'nullable|string|in:following,followers,hashtags'
 		]);
 		]);
 
 
-		$mode = $request->input('mode');
+		$mode = $request->input('mode') ?? 'followers';
 		$profile = Auth::user()->profile;
 		$profile = Auth::user()->profile;
 
 
 		switch ($mode) {
 		switch ($mode) {
@@ -37,10 +37,6 @@ trait RelationshipSettings
 			case 'hashtags':
 			case 'hashtags':
 				$data = $profile->hashtagFollowing()->with('hashtag')->simplePaginate(10);
 				$data = $profile->hashtagFollowing()->with('hashtag')->simplePaginate(10);
 				break;
 				break;
-			
-			default:
-				$data = [];
-				break;
 		}
 		}
 
 
 		return view('settings.relationships.home', compact('profile', 'mode', 'data'));
 		return view('settings.relationships.home', compact('profile', 'mode', 'data'));