Update AccountController

pull/547/head
Daniel Supernault 2018-11-12 21:46:16 -07:00
rodzic 149079bfc7
commit 6e798f3f75
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: 0DEF1C662C9033F7
1 zmienionych plików z 3 dodań i 1 usunięć

Wyświetl plik

@ -64,10 +64,12 @@ class AccountController extends Controller
]);
$profile = Auth::user()->profile;
$action = $request->input('a');
$allowed = ['like', 'follow'];
$timeago = Carbon::now()->subMonths(3);
$following = $profile->following->pluck('id');
$notifications = Notification::whereIn('actor_id', $following)
->where('profile_id', '!=', $profile->id)
->whereIn('action', $allowed)
->where('actor_id', '<>', $profile->id)
->whereDate('created_at', '>', $timeago)
->orderBy('notifications.created_at', 'desc')
->simplePaginate(30);