public function apiResource($name, $controller, array $options = [])
    {
        $only = ['index', 'show', 'store', 'update', 'destroy'];

        if (isset($options['except'])) {
            $only = array_diff($only, (array) $options['except']);
        }

        return $this->resource($name, $controller, array_merge([
            'only' => $only,
        ], $options));
    }
public function apiResource($name, $controller, array $options = [])
    {
        $only = ['index', 'show', 'store', 'update', 'destroy'];

        if (isset($options['except'])) {
            $only = array_diff($only, (array) $options['except']);
        }

        return $this->resource($name, $controller, array_merge([
            'only' => $only,
        ], $options));
    }
public function apiResource ( $ name , $ controller , array $ options = [ ] ) { $ only = [ 'index' , 'show' , 'store' , 'update' , 'destroy' ] ; if ( isset ( $ options [ 'except' ] ) ) { $ only = array_diff ( $ only , ( array ) $ options [ 'except' ] ) ; } return $ this -> resource ( $ name , $ controller , array_merge ( [ 'only' => $ only , ] , $ options ) ) ; }
Route an API resource to a controller.

@param  string  $name
@param  string  $controller
@param  array  $options
@return \Illuminate\Routing\PendingResourceRegistration
Route an API resource to a controller .