����JFIF��x�x����'
Server IP : 66.29.137.217 / Your IP : 3.15.147.225 Web Server : LiteSpeed System : Linux premium294.web-hosting.com 4.18.0-513.11.1.lve.el8.x86_64 #1 SMP Thu Jan 18 16:21:02 UTC 2024 x86_64 User : gltevjme ( 1095) PHP Version : 7.0.33 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : OFF | Pkexec : OFF Directory : /home/gltevjme/bofirmacademy.com/app/Http/Controllers/ |
Upload File : |
<?php namespace App\Http\Controllers; use App\Models\Notification; use App\Traits\General; use Illuminate\Http\Request; ini_set('max_execution_time', 3600); class InstallerController extends Controller { use General; public function notificationUrl($uuid) { $notification = \App\Models\Notification::whereUuid($uuid)->first(); $notification->is_seen = 'yes'; $notification->save(); if (is_null($notification->target_url)) { return redirect(url()->previous()); } else { return redirect($notification->target_url); } } public function markAllAsReadNotification(Request $request) { if(auth()->user()->role == USER_ROLE_ADMIN){ Notification::where('user_type', 1)->where('is_seen', 'no')->orderBy('created_at', 'DESC')->update(['is_seen' => 'yes']); } elseif((auth()->user()->role == USER_ROLE_INSTRUCTOR || auth()->user()->role == USER_ROLE_ORGANIZATION) && $request->type == 2){ Notification::where('user_id', auth()->user()->id)->where('user_type', 2)->where('is_seen', 'no')->update(['is_seen' => 'yes']); } else{ Notification::where('user_id', auth()->user()->id)->where('user_type', 3)->where('is_seen', 'no')->update(['is_seen' => 'yes']); } return back(); } }