PHP code example of webdevhayes / laravel-theme-system

1. Go to this page and download the library: Download webdevhayes/laravel-theme-system library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

webdevhayes / laravel-theme-system example snippets


$themeSystem = new LaravelThemeSystem();

$themes = $themeSystem->getThemes();

$themes = $themeSystem->activateTheme('themeNameHere');

/*
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
*/
bash
php artisan vendor:publish --provider="Webdevhayes\LaravelThemeSystem\LaravelThemeSystemServiceProvider" --tag="migrations"
php artisan migrate
bash
php artisan vendor:publish --provider="Webdevhayes\LaravelThemeSystem\LaravelThemeSystemServiceProvider" --tag="views"