Skip to content

Instantly share code, notes, and snippets.

@joselfonseca
Created May 25, 2017 12:53
Show Gist options
  • Select an option

  • Save joselfonseca/0e1981a20ec5e3b56c38212e68d1214d to your computer and use it in GitHub Desktop.

Select an option

Save joselfonseca/0e1981a20ec5e3b56c38212e68d1214d to your computer and use it in GitHub Desktop.
<?php
$api = app('Dingo\Api\Routing\Router');
$api->version('v1', function ($api) {
$api->get('ping', function(){
return [
'status' => 'ok',
'timestamp' => \Carbon\Carbon::now()
];
});
$api->group(['middleware' => ['api.auth', 'throttle:60,1'], 'providers' => ['passport']], function ($api) {
$api->resource('users', 'App\Http\Controllers\Users\UsersController');
});
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment