فهرست منبع

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