Skip to content

Commit

Permalink
formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
denisdulici committed Feb 17, 2021
1 parent 043af4a commit 1a9fc8c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 10 deletions.
6 changes: 1 addition & 5 deletions app/Http/Requests/Common/Contact.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,7 @@ public function rules()

// Check if store or update
if ($this->getMethod() == 'PATCH') {
$model = $type;

if ($this->isApi()) {
$model = 'contact';
}
$model = $this->isApi() ? 'contact' : $type;

$id = is_numeric($this->$model) ? $this->$model : $this->$model->getAttribute('id');
} else {
Expand Down
6 changes: 1 addition & 5 deletions app/Http/Requests/Document/Document.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,11 +32,7 @@ public function rules()

// Check if store or update
if ($this->getMethod() == 'PATCH') {
$model = $type;

if ($this->isApi()) {
$model = 'document';
}
$model = $this->isApi() ? 'document' : $type;

$id = is_numeric($this->$model) ? $this->$model : $this->{$model}->getAttribute('id');
} else {
Expand Down

0 comments on commit 1a9fc8c

Please sign in to comment.