This is a Laravel package that adds basic support for managing themes. Inspire from Caffeinated Themes for support on Laravel 9
Simply install the package through Composer. From here the package will automatically register its service provider and Theme
facade.
composer require uchup07/laravel-themes
To publish the config file, run the following:
php artisan vendor:publish --provider="Uchup07\LaravelThemes\LaravelThemesServiceProvider" --tag="config"
Theme can be created using make:laravel-theme <slug>
Example artisan command:
php artisan make:laravel-theme bootstrap
this will generate folder themes/bootstrap
on root application.
Laravel Themes includes a global "helper" PHP function. This is used by the package itself; however, you are free to use it in your own code if you find it convenient.
The theme_path
function returns the fully qualified path to either the currently active or specified theme's directory (passed via the second parameter).
$path = theme_path('resources/js/bootstrap.js');
$path = theme_path('resources/js/bootstrap.js', 'bootstrap');
If you discover any security related issues, please email uchup07@gmail.com instead of using the issue tracker.
The MIT License (MIT). Please see License File for more information.