当使用dingo / api和laravel 5.1制作Api时,野狗的路线不起作用

I am making a test api with dingo and laravel 5.1 but i don't know why my code do not work as i expected. This is just a simple example but it's not work, please help me. This is my route code:

$api = app('Dingo\Api\Routing\Router');

Route::get('/', function () {
    return view('welcome');
});

//this function help use to manage functions on each version. this is version 0.1 (called version groups)
$api->version('v0.1', [ 'namespace'=>'App\Http\Controllers\Api'], function ($api) {
    $api->get('users/{id}', 'TestController@test');
    $api->get('users/{id}', ['as' => 'users.index', 'users' => 'TestController@test']);//make route
    app('Dingo\Api\Routing\UrlGenerator')->version('v0.1')->route('users.index');//finally, create new route
    //Route::get('/users/{id}', 'UserController@show');
});

And this is my TestController code:

namespace app\Http\Controllers\Api;


use app\Http\Controllers\BaseController;

class TestController extends BaseController
{
    public function test($id){
        return $id;
    }
}

Very basic but it is not work when i try to get it from Postman, these code return a jason like this:

"message": "Function () does not exist",
"status_code": 500,

I am looking forward to your help, Thank you.