PHP code example of northlab / thememanager

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

    

northlab / thememanager example snippets


use NorthLab\ThemeManager\Filament\Resources\ThemeResource;

public function panel(Panel $panel): Panel
{
    return $panel
        ->resources([
            ThemeResource::class,
        ]);
}

// Aktif tema bilgisi
$theme = current_theme();

// Tema asset'i
$cssUrl = theme_asset('css/style.css');

// Tema konfigürasyonu
$config = theme_config('colors.primary');

Route::group(['middleware' => 'theme'], function () {
    Route::get('/', [HomeController::class, 'index']);
    // Diğer route'lar...
});
bash
php artisan migrate