I'm building an api in Laravel 5.2
I've put angular2
in the public map.
But my routes in Laravel don't work anymore. I've installed dingo
and Jwt auth
. In my public folder I've setup angular 2 (that's reachable). When I go to for example domain.dev/api/v1/
I expect to see test
. (I've configured the prefix api
in my api.php
config file). But I see
no input specified
In my homestead.yaml
I've set the vhost to /public
and I've added ip to /etc/hosts
.
When I visit domain.dev I see my angular2 app. So why is my routes file not working anymore?
<?php
$api = app('Dingo\Api\Routing\Router');
$api->version('v1',function($api)
{
$api->group(['prefix' => 'v1'],function($api)
{
/*
* Authentication
*/
$controllerPath = 'App\Http\Controllers\api\v1\Authentication@';
$api->post('/login', $controllerPath.'login');
$api->get('/', function() {
dd('test');
});
});
$api->group(['prefix' => 'v1', 'middleware' => 'jwt.auth'],function($api)
{
});
});
Thankyou