is "Nitseditor\System\Resources\Views\Themes\" actually a path or is this a namespace of sorts?
Dynamic view folder destination in laravel 5.3
I'm making an application on Laravel 5.3. I'm trying to set dynamic paths of views for my theme based application. I tried almost everything but don't know why it is not changing/adding. This is continuation of following question:
Well I also tried making a webViewServiceProvider as ServiceProvider and trying to set the views in the boot method:
$view_path = base_path('Nitseditor\System\Resources\Views\Themes\\'.$themename);
View::addLocation($view_path);
but it is not adding to the path. while making a Config::set() I'm able to change the path but while executing it is not finding the blade file.
Config::set('view.paths', array($view_path));
Even this doesn't worked for me:
$finder = new \Illuminate\View\FileViewFinder(app()['files'], array(app_path().$themename));
View::setFinder($finder);
And even this:
App::make('view.finder')->addLocation( 'my_views_path' );
I don't know where I'm making mistake, been stuck for last couple of days. Help me out.
Well I kept on trying to die dump the code and tried checking $app array. I guess when I try doing App::make::('config') laravel collects information from the configuration files and shows the configuration array of app in which dynamic configuration are not being displayed.
Then I simply tried checking my views:
return view('template');
It displayed the blade file/views exactly what I required, well it might help someone. Don't panic with
$app = App::make('config');
dd($app);
Cheers!!
Please or to participate in this conversation.