laravel-learn-bbs/app/Http/Controllers/NotificationsController.php

14 lines
311 B
PHP
Raw Permalink Normal View History

2018-01-27 10:35:56 +00:00
<?php
namespace App\Http\Controllers;
class NotificationsController extends Controller
{
public function index()
{
$notifications = \Auth::user()->notifications()->paginate(20);
\Auth::user()->markAsRead();
return view('notifications.index', compact('notifications'));
}
}