From 1b30061575cd2c37990e530f07606e2b0f8ee761 Mon Sep 17 00:00:00 2001 From: Stolz Date: Tue, 10 Feb 2015 18:52:30 +0100 Subject: [PATCH] Fix conflict between Laravel 4 and 5 config namespace --- src/Laravel/FlushPipelineCommand.php | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/Laravel/FlushPipelineCommand.php b/src/Laravel/FlushPipelineCommand.php index 445f4ca..502ad23 100644 --- a/src/Laravel/FlushPipelineCommand.php +++ b/src/Laravel/FlushPipelineCommand.php @@ -28,10 +28,13 @@ class FlushPipelineCommand extends Command */ public function fire() { + // Determine the config namespace sepatator + $glue = (file_exists(app_path('config/packages/stolz/assets/config.php'))) ? '::' : '.'; + // Get directory paths - $pipeDir = Config::get('assets::pipeline_dir', 'min'); - $cssDir = public_path(Config::get('assets::css_dir', 'css') . DIRECTORY_SEPARATOR . $pipeDir); - $jsDir = public_path(Config::get('assets::js_dir', 'js') . DIRECTORY_SEPARATOR . $pipeDir); + $pipeDir = Config::get("assets{$glue}pipeline_dir", 'min'); + $cssDir = public_path(Config::get("assets{$glue}css_dir", 'css') . DIRECTORY_SEPARATOR . $pipeDir); + $jsDir = public_path(Config::get("assets{$glue}js_dir", 'js') . DIRECTORY_SEPARATOR . $pipeDir); // Ask for confirmation if( ! $this->option('force'))