diff --git a/README.md b/README.md index dee6de9..e58724e 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ String Blade Compiler ======================= -[![Laravel 5.2](https://img.shields.io/badge/Laravel-5.2-orange.svg?style=flat-square)](http://laravel.com) +[![Laravel 5.7](https://img.shields.io/badge/Laravel-5.7-orange.svg?style=flat-square)](http://laravel.com) [![License](http://img.shields.io/badge/license-MIT-brightgreen.svg?style=flat-square)](https://tldrlegal.com/license/mit-license) Render Blade templates from string value. @@ -23,6 +23,10 @@ Version 3.4 is a version for Laravel 5.4. Version 3.5 is a version for Laravel 5.5. +Version 3.6 is a version for Laravel 5.6. + +Version 3.7 is a version for Laravel 5.7. + Installation ======================= @@ -36,7 +40,7 @@ Add the package to composer.json: On packagist.org at https://packagist.org/packages/wpb/string-blade-compiler Or from the console using require: composer require "wpb/string-blade-compiler" - + To get versions 'composer show wpb/string-blade-compiler', such as 'dev-master, * 3.2.x-dev, 3.2.0, 3.0.x-dev, 3.0.0, 2.1.0, 2.0.x-dev, 2.0.0, 1.0.x-dev, 1.0.0' In config\app.php, providers section: diff --git a/composer.json b/composer.json index 4732e04..4f6808a 100644 --- a/composer.json +++ b/composer.json @@ -11,12 +11,12 @@ ], "require": { "php": ">=5.6.4", - "laravel/framework": "5.6.*" + "laravel/framework": "5.7.*" }, "autoload": { "psr-4": { "Wpb\\String_Blade_Compiler\\": "src/" - } + } }, "minimum-stability": "dev" } diff --git a/src/Compilers/BladeCompiler.php b/src/Compilers/BladeCompiler.php index 5a55d69..4f10120 100644 --- a/src/Compilers/BladeCompiler.php +++ b/src/Compilers/BladeCompiler.php @@ -31,9 +31,9 @@ protected function compileRegularEchos($value) $whitespace = empty($matches[3]) ? '' : $matches[3].$matches[3]; if ($this->contentTagsEscaped) { - $wrapped = sprintf('e(%s)', $this->compileEchoDefaults($matches[2])); + $wrapped = sprintf('e(%s)', $matches[2]); } else { - $wrapped = sprintf('%s', $this->compileEchoDefaults($matches[2])); + $wrapped = sprintf('%s', $matches[2]); } return $matches[1] ? substr($matches[0], 1) : ''.$whitespace; @@ -55,7 +55,7 @@ protected function compileEscapedEchos($value) $callback = function ($matches) { $whitespace = empty($matches[2]) ? '' : $matches[2].$matches[2]; - return 'compileEchoDefaults($matches[1]).'); ?>'.$whitespace; + return ''.$whitespace; }; return preg_replace_callback($pattern, $callback, $value);