PHP code example of monkblog / theme-manager

1. Go to this page and download the library: Download monkblog/theme-manager 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/ */

    

monkblog / theme-manager example snippets


$basePath = null;
$\ThemeManager\Starter )->start( $basePath, $

$themeManager = theme_manager( null, [ 'display_name', 'version', 'license', ] );

( new \ThemeManager\Starter )->bootstrapAutoload();

theme_manager_starter()->bootstrapAutoload();

theme_manager_starter()->bootstrapAutoload( '/path/to/theme-folder' );

ThemeManager::all();
ThemeManager::getAllThemeNames();

ThemeManager::themeExists( 'theme-name' );
$theme = ThemeManager::getTheme( 'theme-name' );
$themeName = $theme->getName();



return [

    'base_path' => __DIR__ . '/../path/to/themes-folder',

    //Other config stuff
    ...
];

ThemeManager::addThemeLocation( base_path( '/path/to/alternative/themes-folder' ) );

'ThemeManager' => 'ThemeManager\Facade\ThemeManager',

php artisan vendor:publish --tag=theme