File tree Expand file tree Collapse file tree
src/Illuminate/View/Compilers Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -272,6 +272,17 @@ protected function compileAppend($expression)
272272 return "<?php \$__env->appendSection(); ?> " ;
273273 }
274274
275+ /**
276+ * Compile the end-section statements into valid PHP.
277+ *
278+ * @param string $expression
279+ * @return string
280+ */
281+ protected function compileEndsection ($ expression )
282+ {
283+ return "<?php \$__env->stopSection(); ?> " ;
284+ }
285+
275286 /**
276287 * Compile the stop statements into valid PHP.
277288 *
Original file line number Diff line number Diff line change @@ -295,6 +295,13 @@ public function testStopSectionsAreCompiled()
295295 }
296296
297297
298+ public function testEndSectionsAreCompiled ()
299+ {
300+ $ compiler = new BladeCompiler ($ this ->getFiles (), __DIR__ );
301+ $ this ->assertEquals ('<?php $__env->stopSection(); ?> ' , $ compiler ->compileString ('@endsection ' ));
302+ }
303+
304+
298305 public function testAppendSectionsAreCompiled ()
299306 {
300307 $ compiler = new BladeCompiler ($ this ->getFiles (), __DIR__ );
You can’t perform that action at this time.
0 commit comments