php - Laravel 5.2 Dingo/api resources group -
as title mentions, trying figure out how make resource group dingo.
as explains laravel, correct way make resource group in route is:
route::resource('item', 'api\itemcontroller');
is similar dingo/api? can say:
$api = app('dingo\api\routing\router'); $api->version('v1', function($api){ $api->resources('item','app\http\controllers\api\itemcontroller'); });
when executing way, type error:
argument 1 passed dingo\api\routing\router::resources() must of type array, string given
does mean have make array of calls need , pass resources
method?
you have typo there. actual method resource
not resources
$api->version('v1', function($api){ $api->resource('item','app\http\controllers\api\itemcontroller'); });
Comments
Post a Comment