diff --git a/composer.json b/composer.json index c9c6a0e..719d163 100755 --- a/composer.json +++ b/composer.json @@ -1,9 +1,14 @@ { - "name": "digivo/laravel-string-blade-compiler", + "name": "bilaliqbalr/laravel-string-blade-compiler", "description": "Render Blade templates from a string", "keywords": ["laravel", "blade", "compiler", "eloquent", "model"], "license": "MIT", "authors": [ + { + "name": "Bilal", + "email": "bilal@phalcosoft.com", + "homepage": "https://phalcosoft.com" + }, { "name": "Digivo", "email": "hello@digivo.co.uk" @@ -23,7 +28,7 @@ }, "autoload": { "psr-0": { - "Digivo\\StringBladeCompiler\\": "src/" + "Bilaliqbalr\\StringBladeCompiler\\": "src/" } }, "minimum-stability": "stable" diff --git a/readme.md b/readme.md index 491d517..70da94d 100755 --- a/readme.md +++ b/readme.md @@ -6,19 +6,19 @@ Originally forked from [Flynsarmy/laravel-db-blade-compiler](https://github.com/ This package generates and returns a compiled view from a provided string -### Installation (Laravel 5.x) +### Installation (Laravel 5.4.x) -Require this package in your composer.json and run composer update (or run `composer require digivo/laravel-string-blade-compiler:1.*` directly): +Require this package in your composer.json and run composer update (or run `composer require bilaliqbalr/laravel-string-blade-compiler:1.*` directly): - "digivo/laravel-string-blade-compiler": "1.*" + "bilaliqbalr/laravel-string-blade-compiler": "1.*" After updating composer, add the ServiceProvider to the providers array in app/config/app.php - 'Digivo\StringBladeCompiler\StringBladeCompilerServiceProvider', + Bilaliqbalr\StringBladeCompiler\StringBladeCompilerServiceProvider::class, and the Facade to the aliases array in the same file - 'StringView' => 'Digivo\StringBladeCompiler\Facades\DigivoView', + 'StringView' => Bilaliqbalr\StringBladeCompiler\Facades\StringView::class, You have to also publish the config-file diff --git a/src/Digivo/StringBladeCompiler/Facades/StringView.php b/src/Bilaliqbalr/StringBladeCompiler/Facades/StringView.php similarity index 82% rename from src/Digivo/StringBladeCompiler/Facades/StringView.php rename to src/Bilaliqbalr/StringBladeCompiler/Facades/StringView.php index f13268d..e9acf02 100755 --- a/src/Digivo/StringBladeCompiler/Facades/StringView.php +++ b/src/Bilaliqbalr/StringBladeCompiler/Facades/StringView.php @@ -1,5 +1,5 @@ -getEngineResolver()->resolve('blade')->getCompiler(); parent::__construct($filesystem, $cache_path); - $this->rawTags = $blade->getRawTags(); - $this->contentTags = $blade->getContentTags(); - $this->escapedTags = $blade->getEscapedContentTags(); - $this->extensions = $blade->getExtensions(); + $this->rawTags = $blade->rawTags; + $this->contentTags = $blade->contentTags; + $this->escapedTags = $blade->escapedTags; + $this->extensions = $blade->extensions; $this->customDirectives = $blade->getCustomDirectives(); $this->config = $config; } @@ -54,7 +54,7 @@ public function getCompiledPath($path) * * e.g db_table_name_id_4 */ - return $this->cachePath . '/' . md5($path); + return $this->cachePath . '/' . md5($path) . '.php'; } /** diff --git a/src/Digivo/StringBladeCompiler/StringBladeCompilerServiceProvider.php b/src/Bilaliqbalr/StringBladeCompiler/StringBladeCompilerServiceProvider.php similarity index 92% rename from src/Digivo/StringBladeCompiler/StringBladeCompilerServiceProvider.php rename to src/Bilaliqbalr/StringBladeCompiler/StringBladeCompilerServiceProvider.php index 4d8ba0b..cf93730 100644 --- a/src/Digivo/StringBladeCompiler/StringBladeCompilerServiceProvider.php +++ b/src/Bilaliqbalr/StringBladeCompiler/StringBladeCompilerServiceProvider.php @@ -1,5 +1,5 @@ -app->booting(function () { $loader = \Illuminate\Foundation\AliasLoader::getInstance(); - $loader->alias('StringView', 'Digivo\StringBladeCompiler\Facades\StringView'); + $loader->alias('StringView', 'Bilaliqbalr\StringBladeCompiler\Facades\StringView'); }); } diff --git a/src/Digivo/StringBladeCompiler/StringView.php b/src/Bilaliqbalr/StringBladeCompiler/StringView.php similarity index 97% rename from src/Digivo/StringBladeCompiler/StringView.php rename to src/Bilaliqbalr/StringBladeCompiler/StringView.php index c3fee3e..9ab3400 100755 --- a/src/Digivo/StringBladeCompiler/StringView.php +++ b/src/Bilaliqbalr/StringBladeCompiler/StringView.php @@ -1,5 +1,5 @@ -