forked from mirror/pixelfed
Update AccountController
This commit is contained in:
parent
c22a8197a5
commit
b35e6d0366
1 changed files with 19 additions and 0 deletions
|
@ -40,6 +40,25 @@ class AccountController extends Controller
|
||||||
return view('account.activity', compact('profile', 'notifications'));
|
return view('account.activity', compact('profile', 'notifications'));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function followingActivity(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(1);
|
||||||
|
$following = $profile->following->pluck('id');
|
||||||
|
$notifications = Notification::whereIn('actor_id', $following)
|
||||||
|
->where('profile_id', '!=', $profile->id)
|
||||||
|
->whereDate('created_at', '>', $timeago)
|
||||||
|
->orderBy('notifications.id','desc')
|
||||||
|
->simplePaginate(30);
|
||||||
|
|
||||||
|
return view('account.following', compact('profile', 'notifications'));
|
||||||
|
}
|
||||||
|
|
||||||
public function verifyEmail(Request $request)
|
public function verifyEmail(Request $request)
|
||||||
{
|
{
|
||||||
return view('account.verify_email');
|
return view('account.verify_email');
|
||||||
|
|
Loading…
Reference in a new issue