PHP code example of sashagm / themes

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

    

sashagm / themes example snippets


    'admin_prefix'      => 'admin', // Префикс для маршрутов

    'check'             => [

        'active'        => true, // True Разрешить проверку или false Пропускать проверку
        'guard'         => 'web', // Укажите через какой гард будет работать

        'save_colum'    => 'id', // Поле для группы/роли или прав
        'save_value'    => [
            1, 2, 3
        ], // добавляем массив значений

    ],


if (Themes){ 


    view(Themes.'main.index');



 <link href="{{ Themes.'/css/style.css' }}" rel="stylesheet" />

 <script src="{{ Themes.'/js/app.js' }}"></script>



    'check'             => [

        'active'        => true, // True Разрешить проверку или false Пропускать проверку
        'guard'         => 'web', // Укажите через какой гард будет работать

        'save_colum'    => 'id', // Поле для группы/роли или прав
        'save_value'    => [
            1, 2, 3
        ], // добавляем массив значений

    ],


// получить заголовок текущей активной темы
$title = Themes::getActiveThemeTitle();

// получить описание текущей активной темы
$description = Themes::getActiveThemeDescription();

// получить общую информацию о текущей активной теме
$info = Themes::getThemeInfo();