/** * Revise the protected state of a controller method. * * @param \Dingo\Api\Routing\Route $action * @param \Illuminate\Routing\Controller $controller * @param string $method * * @return void */ protected function reviseProtection(Route $route, $controller, $method) { $properties = $controller->getProperties(); if (isset($properties['*']['protected'])) { $route->setProtected($properties['*']['protected']); } if (isset($properties[$method]['protected'])) { $route->setProtected($properties[$method]['protected']); } }