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

Popular posts from this blog

java - Run spring boot application error: Cannot instantiate interface org.springframework.context.ApplicationListener -

reactjs - React router and this.props.children - how to pass state to this.props.children -

Excel VBA "Microsoft Windows Common Controls 6.0 (SP6)" Location Changes -