public function notifications() { session_start(); $data = array(); $loginClass = new Login(); $id = $loginClass->isLogged(); if ($id) { $user = new User($id); $data['user'] = $user; $notifClass = new Notifications(); $notif = $notifClass->getNotifications($id); $messages = array(); foreach ($notif as $i) { $messages[$i->id] = $notifClass->getMessage($i); } $data['messages'] = $messages; $this->view('user/notif', $data); } else { $this->redirect(''); } }
public function getNotifications($params) { $notifications = new Notifications(); $notifications->getNotifications($params); }