uchup07/laravel-themes

Themes for laravel

1.0.3 2022-06-22 08:15 UTC

This package is auto-updated.

Last update: 2024-05-30 01:00:01 UTC


README

Source Latest Stable Version License Total Downloads

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.