From 796fc270187555fdc7b2f1617b418a3cf5fe07d0 Mon Sep 17 00:00:00 2001 From: Gilbert Pellegrom Date: Fri, 2 Mar 2018 13:05:30 +0000 Subject: [PATCH 1/2] Add @dump blade helper --- .../View/Compilers/Concerns/CompilesHelpers.php | 11 +++++++++++ tests/View/Blade/BladeHelpersTest.php | 1 + 2 files changed, 12 insertions(+) diff --git a/src/Illuminate/View/Compilers/Concerns/CompilesHelpers.php b/src/Illuminate/View/Compilers/Concerns/CompilesHelpers.php index 4edd61f475ee..b9bca27650db 100644 --- a/src/Illuminate/View/Compilers/Concerns/CompilesHelpers.php +++ b/src/Illuminate/View/Compilers/Concerns/CompilesHelpers.php @@ -35,4 +35,15 @@ protected function compileMethod($method) { return ""; } + + /** + * Compile the "dump" statements into valid PHP. + * + * @param string $arguments + * @return string + */ + protected function compileDump($arguments) + { + return ""; + } } diff --git a/tests/View/Blade/BladeHelpersTest.php b/tests/View/Blade/BladeHelpersTest.php index c22e6508637d..9df79cec08a7 100644 --- a/tests/View/Blade/BladeHelpersTest.php +++ b/tests/View/Blade/BladeHelpersTest.php @@ -10,5 +10,6 @@ public function testEchosAreCompiled() $this->assertEquals('', $this->compiler->compileString("@method('patch')")); $this->assertEquals('', $this->compiler->compileString('@dd($var1)')); $this->assertEquals('', $this->compiler->compileString('@dd($var1, $var2)')); + $this->assertEquals('', $this->compiler->compileString('@dump($var1, $var2)')); } } From 63015f5f5268ab3bdedec623d28f73516a34dd1f Mon Sep 17 00:00:00 2001 From: Taylor Otwell Date: Fri, 2 Mar 2018 09:17:58 -0600 Subject: [PATCH 2/2] Update CompilesHelpers.php --- .../View/Compilers/Concerns/CompilesHelpers.php | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/Illuminate/View/Compilers/Concerns/CompilesHelpers.php b/src/Illuminate/View/Compilers/Concerns/CompilesHelpers.php index b9bca27650db..979cadc560cf 100644 --- a/src/Illuminate/View/Compilers/Concerns/CompilesHelpers.php +++ b/src/Illuminate/View/Compilers/Concerns/CompilesHelpers.php @@ -26,24 +26,24 @@ protected function compileDd($arguments) } /** - * Compile the method statements into valid PHP. + * Compile the "dump" statements into valid PHP. * - * @param string $method + * @param string $arguments * @return string */ - protected function compileMethod($method) + protected function compileDump($arguments) { - return ""; + return ""; } /** - * Compile the "dump" statements into valid PHP. + * Compile the method statements into valid PHP. * - * @param string $arguments + * @param string $method * @return string */ - protected function compileDump($arguments) + protected function compileMethod($method) { - return ""; + return ""; } }