diff --git a/README.md b/README.md index 0c42f7f..4eb817a 100644 --- a/README.md +++ b/README.md @@ -42,14 +42,16 @@ You will want to publish the themes config, and you will now see a new config lo return [ - 'themes_folder' => resource_path('views/themes'), + 'folder' => resource_path('themes'), 'publish_assets' => true, 'create_tables' => true ]; ``` -Now, you can choose an alternate location for your themes folder. By default this will be put into the `resources/views` folder; however, you can change that to any location you would like. +Now, you can choose an alternate location for your themes folder. By default this will be put into the `resources` folder; however, you can change that to any location you would like. + +> Warning, If you add the themes folder into the `resources/views` folder and you run `php artisan optimize` you may get an error that it cannot find certain components. This is because it will search all the `.blade.php` files inside the views folder. So, this may not be the best place to put your themes. Instead this package will register only the views of the active theme. Additionally, you can set **publish_assets** to *true* or *false*, if it is set to *true* anytime the themes directory is scanned it will publish the `assets` folder in your theme to the public folder inside a new `themes` folder. Set this to *false* and this will no longer happen. diff --git a/config/themes.php b/config/themes.php index 282c00a..7edc6ac 100644 --- a/config/themes.php +++ b/config/themes.php @@ -1,9 +1,7 @@ resource_path('views/themes'), + 'folder' => resource_path('themes'), 'publish_assets' => true, 'create_tables' => true - ]; \ No newline at end of file diff --git a/resources/views/index.blade.php b/resources/views/index.blade.php index b818327..bbc4910 100644 --- a/resources/views/index.blade.php +++ b/resources/views/index.blade.php @@ -164,7 +164,7 @@ @if(count($themes) < 1)
It doesn't look like you have any themes available in your theme folder located at = resource_path('views/themes'); ?>
It doesn't look like you have any themes available in your theme folder located at = resource_path('themes'); ?>