Не удается вызвать scope модели через такую функцию. Возможно ли как-то реализовать?
$objects = $this->getScope("My"); public function getScope($scope, $parameters = false) { if($parameters) { $result = $this->model->{$scope($parameters)}->get(); } else { $result = $this->model->{$scope()}->get(); } return $result; }
Ошибка: Call to undefined function my()