formatting
This commit is contained in:
parent
043af4a602
commit
1a9fc8cfe1
@ -31,11 +31,7 @@ class Contact extends FormRequest
|
||||
|
||||
// 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 {
|
||||
|
@ -32,11 +32,7 @@ class Document extends FormRequest
|
||||
|
||||
// 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 {
|
||||
|
Loading…
x
Reference in New Issue
Block a user