From 7ff698ddab815888759946a5a2b71b019de39911 Mon Sep 17 00:00:00 2001 From: Andrew Date: Tue, 18 Jun 2019 17:09:06 -0500 Subject: [PATCH] compile `@endcomponentFirst` while the `@endcomponent` directive is perfectly valid to end a `@componentFirst`, the IDEs struggle to match the 2 up resulting in a syntax error, which I'm sure people will be upset about. I would prefer the plugin handle this if it can, but I'm not sure if it can, or where to change that, so I'm PR'ing here for now. --- .../View/Compilers/Concerns/CompilesComponents.php | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/Illuminate/View/Compilers/Concerns/CompilesComponents.php b/src/Illuminate/View/Compilers/Concerns/CompilesComponents.php index 822d3448103d..1ed3b9c22cd0 100644 --- a/src/Illuminate/View/Compilers/Concerns/CompilesComponents.php +++ b/src/Illuminate/View/Compilers/Concerns/CompilesComponents.php @@ -56,4 +56,14 @@ protected function compileComponentFirst($expression) { return "startComponentFirst{$expression}; ?>"; } + + /** + * Compile the end-component-first statements into valid PHP. + * + * @return string + */ + protected function compileEndComponentFirst() + { + return $this->compileEndComponent(); + } }