diff --git a/app/Http/routes.php b/app/Http/routes.php index 2f2a2b7..a4fe7de 100755 --- a/app/Http/routes.php +++ b/app/Http/routes.php @@ -20,11 +20,18 @@ return Response::json(Authorizer::issueAccessToken()); }); -Route::get('api', ['middleware' => 'oauth', function() { +Route::group(['prefix'=>'api','middleware' => 'oauth'], function() { // return the protected resource //echo “success authentication”; - $user_id=Authorizer::getResourceOwnerId(); // the token user_id - $user=\App\User::find($user_id);// get the user data from database + + Route::post('/user', function () { + + $user_id=Authorizer::getResourceOwnerId(); // the token user_id + $user=\App\User::find($user_id);// get the user data from database -return Response::json($user); -}]); \ No newline at end of file + return Response::json($user); + }); + + + +});