/** * Store a newly created resource in storage. * * @param Request $request * @return Response */ public function store() { $notification = new Notification(); $deviceDetail = new DeviceDetails(); $data = Input::all(); $reciverToken = $deviceDetail->getLatestDetailByUserId($data['reciver_id']); $sendNotification = $notification->sendPushNotification($data, $reciverToken); $msg = "Successfully."; return $this->successMessageWithVar($msg, $sendNotification); }