uchup07 / laravel-themes
Themes for laravel
Requires
- php: ^7.4|^8.0|^8.1
- illuminate/support: ^8.0|^9.0
Requires (Dev)
- orchestra/testbench: ^6.0
- phpunit/phpunit: ^9.0
- spatie/phpunit-snapshot-assertions: ^4.2
README
This is a Laravel package that adds basic support for managing themes. Inspire from Caffeinated Themes for support on Laravel 9
Installation
Simply install the package through Composer. From here the package will automatically register its service provider and Theme
facade.
composer require uchup07/laravel-themes
Config
To publish the config file, run the following:
php artisan vendor:publish --provider="Uchup07\LaravelThemes\LaravelThemesServiceProvider" --tag="config"
BASIC USAGE
Create a theme
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.
Helpers
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.
theme_path
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');
Security
If you discover any security related issues, please email uchup07@gmail.com instead of using the issue tracker.
Credits
License
The MIT License (MIT). Please see License File for more information.