Trigger the editor is rendering event on assets view composer and send editor variable to view

parent 07fd5ab2
......@@ -4,6 +4,7 @@ namespace Modules\Core\Composers;
use Illuminate\Contracts\View\View;
use Illuminate\Http\Request;
use Modules\Core\Events\EditorIsRendering;
use Modules\Core\Foundation\Asset\Manager\AssetManager;
use Modules\Core\Foundation\Asset\Pipeline\AssetPipeline;
use Modules\Core\Foundation\Asset\Types\AssetTypeFactory;
......@@ -48,7 +49,10 @@ class AssetsViewComposer
$this->assetPipeline->requireCss(config('asgard.core.core.admin-required-assets.css'));
$this->assetPipeline->requireJs(config('asgard.core.core.admin-required-assets.js'));
event($editor = new EditorIsRendering($this->assetPipeline));
$view->with('cssFiles', $this->assetPipeline->allCss());
$view->with('jsFiles', $this->assetPipeline->allJs());
$view->with('editor', $editor);
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment