[Embed][ENTITY] Fix embed route and use attachment_view rather than _show. Rename Entity::have to Entity::has, because grammar
This commit is contained in:
@@ -33,8 +33,8 @@ abstract class Entity
|
||||
{
|
||||
public function __call(string $name , array $arguments): mixed
|
||||
{
|
||||
if (Formatting::startsWith($name, 'have')) {
|
||||
$prop = Formatting::camelCaseToSnakeCase(Formatting::removePrefix($name, 'have'));
|
||||
if (Formatting::startsWith($name, 'has')) {
|
||||
$prop = Formatting::camelCaseToSnakeCase(Formatting::removePrefix($name, 'has'));
|
||||
return isset($this->{$prop});
|
||||
}
|
||||
throw new \Exception("Entity::{$name} called with bogus arguments: " . print_r($arguments, true));
|
||||
|
Reference in New Issue
Block a user