I have install the Dingo with composer, and change the app.php file. After configure the app.php file, then i have publish vendor that, and get the api.php file.
$api = app('Dingo\Api\Routing\Router');
$api->version('v1', ['namespace' => 'App\Http\Controllers'], function ($api) {
$api->get('users', 'EventsController@index');
});
Then i try php artisan api:routes
This is my result:
+----------------+----------------+------+---------+-----------+------------+----------+
| Host | URI | Name | Action | Protected | Version(s) | Scope(s) |
+----------------+----------------+------+---------+-----------+------------+----------+
| api.kayice.com | GET|HEAD users | | Closure | No | v1 | |
+----------------+----------------+------+---------+-----------+------------+----------+
Then i php artisan serve
go to localhost:8000/user
It just show me this Sorry, the page you are looking for could not be found.
Could that anything is might miss for that?
Edited
I have added the provider in the app.php, i think after the vendor publish, the api working, then everythings should working. Or else is the laravel 5.2 problem?