Skip to content

Commit

Permalink
Fix styling
Browse files Browse the repository at this point in the history
  • Loading branch information
colinhall17 authored and actions-user committed Jan 16, 2021
1 parent e636a1c commit ec24500
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/Support/PersistResource.php
Original file line number Diff line number Diff line change
Expand Up @@ -147,11 +147,11 @@ public function getValidationAttributes()
foreach ($resource as $field => $rules) {
if ($this->hasRelation($key)) {
$relation = $this->getRelation($key)->type;
} elseif (!is_null($this->object) && method_exists($this->object, $key)) {
} elseif (! is_null($this->object) && method_exists($this->object, $key)) {
$relation = $this->object->$key()->type;
} elseif (!is_null($this->object) && method_exists($this->object, Str::studly($key))) {
} elseif (! is_null($this->object) && method_exists($this->object, Str::studly($key))) {
$relation = $this->object->{Str::studly($key)}()->type;
} elseif (!is_null($this->object) && method_exists($this->object, lcfirst($key))) {
} elseif (! is_null($this->object) && method_exists($this->object, lcfirst($key))) {
$relation = $this->object->{lcfirst($key)}()->type;
} else {
$relation = 'HasOne';
Expand Down

0 comments on commit ec24500

Please sign in to comment.