Use array_get's third parameter for default value.
This allows for using boolean values as default options.
This commit is contained in:
1 parent
e5011d337c
commit
fa2628d311
1 file changed
+1
-1
@@ -81,7 +81,7 @@ trait Componentable
|
||||
$default = null;
|
||||
}
|
||||
|
||||
$data[$variable] = array_get($arguments, $i) ?: $default;
|
||||
$data[$variable] = array_get($arguments, $i, $default);
|
||||
|
||||
$i++;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user