0
嗨,我是用巴丁格阿比DEV-主b36db17(1.0.*@dev)與Laravel 5.2.11巴丁格API不登記的路線
當我嘗試存取權限我的API路線我得到一個錯誤:
"The version given was unknown or has no registered routes." (status:400)
這裏是我的API路線:
$api = app('Dingo\Api\Routing\Router');
$api->version('v1', ['version' => 'v1', 'prefix' => 'api'], function ($api) {
Route::group(['prefix' => 'api', 'version' => 'v1'], function() {
//# Version 1 routes here
Route::post('login', [
'uses' => 'App\Api\V1\Http\Controllers\[email protected]',
'as' => 'api.login'
]);
});
});
命令php artisan api:routes
顯示什麼
我需要一些幫助PLE ase
編輯 - 27/01/16
適配器的用途是什麼?
它看起來像路由不會被加載:
類實現
public function dispatch(Request $request, $version)
{
if (! isset($this->routes[$version])) {
var_dump($this->routes);
throw new UnknownVersionException;
}
[...]
}
Laravel類實現Adapter的目的是什麼? – Mushu8