1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798 |
- <?php
- namespace App\Http\Controllers;
- use Illuminate\Contracts\View\Factory;
- use Illuminate\Contracts\View\View;
- use Illuminate\Http\Request;
- use Illuminate\Http\Response;
- use Illuminate\Notifications\Notification;
- use Illuminate\Support\Facades\Auth;
- class NotificationController extends Controller
- {
- /**
- * Display a listing of the resource.
- *
- * @return Factory|View
- */
- public function index()
- {
- $notifications = Auth::user()->notifications()->paginate();
- return view('notifications.index')->with([
- 'notifications' => $notifications
- ]);
- }
- /**
- * Show the form for creating a new resource.
- *
- * @return Response
- */
- public function create()
- {
- //
- }
- /**
- * Store a newly created resource in storage.
- *
- * @param Request $request
- * @return Response
- */
- public function store(Request $request)
- {
- //
- }
- /**
- * Display the specified resource.
- *
- * @param string $id
- * @return Factory|View
- */
- public function show($id)
- {
- $notification = Auth::user()->notifications()->findOrFail($id);
- $notification->markAsRead();
- return view('notifications.show')->with([
- 'notification' => $notification
- ]);
- }
- /**
- * Show the form for editing the specified resource.
- *
- * @param int $id
- * @return Response
- */
- public function edit($id)
- {
- //
- }
- /**
- * Update the specified resource in storage.
- *
- * @param Request $request
- * @param int $id
- * @return Response
- */
- public function update(Request $request, $id)
- {
- //
- }
- /**
- * Remove the specified resource from storage.
- *
- * @param int $id
- * @return Response
- */
- public function destroy($id)
- {
- //
- }
- }
|