How to customize views directory
skalero01 opened this issue · comments
Carlos Escobar commented
Hi, i'd like to customize my views directory to use a subfolder when in the theme was not found the view, so if the view doesn't exist search in views/store folder.
Is there a way to do this?
Regards
UnderlineWords commented
You can define a custom directory in your controller. For example;
// dynamic
return Theme::view($custom_directory . '.index');
// or
return Theme::view('store.index'); // themes/default/views/store/index.blade.php
and even check your directory or file with
File::isDirectory();
is_dir();
// or
scandir();