caffeinated / themes

:art: Laravel Themes package with support for the Caffeinated Modules package.

Home Page:https://caffeinatedpackages.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

How to customize views directory

skalero01 opened this issue · comments

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

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();