Fix when blade call has no arguments

This commit is contained in:
Deon George 2021-12-20 14:35:58 +11:00
parent ef210651aa
commit 71712d445f

View File

@ -27,16 +27,15 @@ class CustomBladeServiceProvider extends ServiceProvider
private function resolve(string $content,string $expression): string private function resolve(string $content,string $expression): string
{ {
if (str_contains($expression,',')) if (str_contains($expression,',')) {
[$type,$arguments] = explode(',',$expression,2); [$type,$arguments] = explode(',',$expression,2);
else {
$type = $expression;
$arguments = '';
}
$arguments = explode('|',$arguments); $arguments = explode('|',$arguments);
} else {
$type = $expression;
$arguments = [];
}
$return = collect(); $return = collect();
$urls = collect(); $urls = collect();