laravel-theme-system maintained by webdevhayes
Description
Adds a theme system to your laravel project
Author
Last update
2022/08/03 23:21
(dev-master)
License
Downloads
12
Tags
Adds a theme system to your laravel project
This package allows you build your own theme system inside any laravel project.
THIS IS ALPHA VERSION AND IS STILL ONGOING DEVELOPMENT
Installation
You can install the package via composer:
composer require webdevhayes/laravel-theme-system
You can publish and run the migrations with:
php artisan vendor:publish --provider="Webdevhayes\LaravelThemeSystem\LaravelThemeSystemServiceProvider" --tag="migrations"
php artisan migrate
You can publish the views with:
php artisan vendor:publish --provider="Webdevhayes\LaravelThemeSystem\LaravelThemeSystemServiceProvider" --tag="views"
Usage
Instantiate the class
$themeSystem = new LaravelThemeSystem();
Get all themes
$themes = $themeSystem->getThemes();
Activate a theme
$themes = $themeSystem->activateTheme('themeNameHere');
Theme folder structure needs to be as follows in order to add custom themes
resources -> views -> vendor -> laravel-theme-system -> themes -> theme name
Theme is identified by a theme.php file
/*
Theme Name: My Theme Name
Theme URI: https://google.com
Author: the WordPress team
Author URI: https://google.com
Description: This is my theme
Version: 1.3
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
*/
Theme image
Add a preview.png or preview.jpg to the theme folder.
TODO/POSSIBLE FEATURES
- Add tests
- Allow custom theme path ability
- Complete theme info functionality
- Add exception handlers
- Add theme upload/delete views
- Add more usable default theme
Changelog
Please see CHANGELOG for more information on what has changed recently.
License
The MIT License (MIT). Please see License File for more information.