How do you access your API normally to see your JSON responses in the browser? Do you access it like http://192.168.1.11:80/laratest/api/public/api/v1/register or something like //api.studystudio.com.ng/api/v1/register?
May 5, 2015
8
Level 4
Problem accessing Lumen API
Please help, i'm accessing lumen api from postman using the url below
http://192.168.1.11:80/laratest/api/public/api/v1/register
it display NotFoundHttpException in Application.php line 1116: The API address is the local IP using ipconfig.
$app->get('/', function() use ($app) {
return $app->welcome();
// return 'i got you!';
});
//api.studystudio.com.ng/i/v1/register
$app->group(['prefix' => 'api/v1'], function() use ($app)
{
$app->post('register', function(){
return response()->json(['message' => 'Unknown Data Attacked, Please try again later!', 'code' => 200], 200);
});
$app->post('activate', function()
{
$me = DB::table('systems')->get();
//$id = DB::table('user')->insertGetId(['email' => 'john@example.com', 'votes' => 0]);
//DB::table('users')->where('id', 1)->update(['votes' => 1]);
dd($me);
});
});
Please what can i do to access the API
Please or to participate in this conversation.