Single folder for theme and assets
Closed this issue · 2 comments
lewyuburi commented
Exist the way to combine theme and assets files in a single folder in "Public" dir?
I think this:
'my-theme' => [ 'views-path' => '/public/themes', 'asset-path' => Theme::url('assets'), ],
(No tested)
Is a correct way?
igaster commented
I've recently added a confguration option to relocate the views base folder. You can add in themes.php
:
'themes_path' =>realpath(base_path('public')),
(see config.php for a complete configurations template)
Now your views subfolders will be placed inside your public folder. An example theme structure could be:
'myTheme' => [
'views-path' => 'myTheme/views', // = path/to/public/myTheme/views
'asset-path' => 'myTheme', // = path/to/public/myTheme
],
Please consider security issues before you place php files in public folders.
Let me know if it worked for you
Cheers!