NotificationController.php 362 B

123456789101112131415
  1. <?php
  2. namespace App\Http\Controllers\Seller;
  3. use Auth;
  4. class NotificationController extends Controller
  5. {
  6. public function index() {
  7. $notifications = auth()->user()->notifications()->paginate(15);
  8. auth()->user()->unreadNotifications->markAsRead();
  9. return view('seller.notification.index', compact('notifications'));
  10. }
  11. }