type check for route parameter
This commit is contained in:
parent
39ec0617ed
commit
f89a72170e
@ -200,7 +200,15 @@ class DeleteButton extends Component
|
|||||||
$page = '';
|
$page = '';
|
||||||
|
|
||||||
if (! empty($this->route)) {
|
if (! empty($this->route)) {
|
||||||
$page = explode('.', $this->route)[0];
|
if (! is_array($this->route)) {
|
||||||
|
$string = $this->route;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (is_array($this->route)) {
|
||||||
|
$string = $this->route[0];
|
||||||
|
}
|
||||||
|
|
||||||
|
$page = explode('.', $string)[0];
|
||||||
} elseif (! empty($this->url)) {
|
} elseif (! empty($this->url)) {
|
||||||
$page = explode('/', $this->url)[1];
|
$page = explode('/', $this->url)[1];
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user