Bläddra i källkod

Update AccountController

Daniel Supernault 6 år sedan
förälder
incheckning
a10e30aefd
1 ändrade filer med 1 tillägg och 21 borttagningar
  1. 1 21
      app/Http/Controllers/AccountController.php

+ 1 - 21
app/Http/Controllers/AccountController.php

@@ -33,27 +33,7 @@ class AccountController extends Controller
 
     public function notifications(Request $request)
     {
-        $this->validate($request, [
-          'page' => 'nullable|min:1|max:3',
-          'a'    => 'nullable|alpha_dash',
-      ]);
-        $profile = Auth::user()->profile;
-        $action = $request->input('a');
-        $timeago = Carbon::now()->subMonths(6);
-        if ($action && in_array($action, ['comment', 'follow', 'mention'])) {
-            $notifications = Notification::whereProfileId($profile->id)
-            ->whereAction($action)
-            ->whereDate('created_at', '>', $timeago)
-            ->orderBy('id', 'desc')
-            ->simplePaginate(30);
-        } else {
-            $notifications = Notification::whereProfileId($profile->id)
-            ->whereDate('created_at', '>', $timeago)
-            ->orderBy('id', 'desc')
-            ->simplePaginate(30);
-        }
-
-        return view('account.activity', compact('profile', 'notifications'));
+        return view('account.activity');
     }
 
     public function followingActivity(Request $request)