/** Add new notification data for Photo * * @param $user_id_from * @param $user_id_to * @param $type_id * @param $restaurant_id * @throws \Exception */ public function addNotificationNewPhoto($user_id_from, $user_id_to, $type_id, $restaurant_id) { try { $notification_data = new Notification(); $notification_data->user_id_from = $user_id_from; $notification_data->user_id_to = $user_id_to; $notification_data->type = CONSTANTS::NOTIFICATION_TYPE_UPLOADED_PHOTO; $notification_data->type_id = $type_id; $notification_data->restaurant_id = $restaurant_id; $notification_data->date_created = date('Y-m-d H:i:s'); $notification_data->save(); $notification_data->sendPush(); } catch (\Exception $e) { throw $e; } }