File tree 1 file changed +4
-6
lines changed
src/Illuminate/View/Compilers
1 file changed +4
-6
lines changed Original file line number Diff line number Diff line change @@ -425,7 +425,7 @@ public function check($name, ...$parameters)
425
425
}
426
426
427
427
/**
428
- * Register a component alias.
428
+ * Register a component alias directive .
429
429
*
430
430
* @param string $path
431
431
* @param string $alias
@@ -436,11 +436,9 @@ public function component($path, $alias = null)
436
436
$ alias = $ alias ?: array_last (explode ('. ' , $ path ));
437
437
438
438
$ this ->directive ($ alias , function ($ expression ) use ($ path ) {
439
- if ($ expression ) {
440
- return "<?php \$__env->startComponent(' {$ path }', {$ expression }); ?> " ;
441
- } else {
442
- return "<?php \$__env->startComponent(' {$ path }'); ?> " ;
443
- }
439
+ return $ expression
440
+ ? "<?php \$__env->startComponent(' {$ path }', {$ expression }); ?> "
441
+ : "<?php \$__env->startComponent(' {$ path }'); ?> " ;
444
442
});
445
443
446
444
$ this ->directive ('end ' .$ alias , function ($ expression ) use ($ path ) {
You can’t perform that action at this time.
0 commit comments