Wednesday, March 15, 2017

Getting data from Android device in laravel

I am trying to get data from android in server in laravel. What I did till now is : here in my route:

    Route::any('jsondata','JsonController@jsonFunction');

And in my controller:

      public function jsonFunction()
 {
    $jsonPostedData = Input::all();
    return response(['jsonobjtest'=>$jsonPostedData]);
}

}

What it gives in browser is:

    {"jsonobjtest":[]}

Actually i want to do is i want to send a success message to android device when it sends data. And get data here in server.



via Suz Aann shrestha

Advertisement