PHP code example of lukeed / lumen-theme

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

    

lukeed / lumen-theme example snippets


// Service provider
$app->register(Lukeed\Theme\ThemeServiceProvider::class);

// Facade
class_alias(Lukeed\Theme\Facade\Theme::class, 'Theme');

// bootstrap/app.php
config(['theme.path' => realpath(base_path('public/custom/path/themes'))]);

// config/theme.php
return [
    'path' => realpath(base_path('public/custom/path/themes'))])
];

// bootstrap/app.php
$app->configure('theme');

view('home');

Theme::set('theme-folder');
 php
view('home', []);
 php
use lukeed\Theme\Contracts\ThemeInterface;

private $theme;

public function __construct(ThemeInterface $theme)
{
    $this->theme = $theme
}