skotner/laravel-theme

Very simple theme package for Laravel.

1.0.0 2021-09-24 09:54 UTC

This package is auto-updated.

Last update: 2024-04-24 16:10:24 UTC


README

The skoTner/laravel-theme package provides an easy way to create multiple view themes in your project. By defining a theme in your route you can choose which view-folder to use.

Here's a demo of how you can use it:

Route::get('home', 'HomeController@home')->middleware('theme:your-theme');

You can also set a theme for a Route group:

Route::group(['middleware' => 'theme:admin-theme'], function() {
	// "admin-theme" will be applied to all routes defined here
});

Documentation

You'll find the documentation on https://github.com/skoTner/laravel-theme.

Find yourself stuck using the package? Found a bug? Do you have general questions or suggestions for improving? Feel free to create an issue on GitHub, I'll try to address it as soon as possible.

If you've found a security issue please mail andreas@skotner.net instead of using the issue tracker.

Installation

You can install the package via composer:

composer require skoTner/laravel-theme

The package will automatically register itself.

You can publish the config with:

php artisan vendor:publish --provider="Skotner\Theme\ThemeServiceProvider"

You can optionally change the path of your themes folder in the config file:

return [

	/*
	* Folder where you will store your themes
	*/
	'folder' => resource_path('views/themes'),

];

Changelog

Please see CHANGELOG for more information about recent changes.

Security

If you discover any security related issues, please email andreas@skotner.net instead of using the issue tracker.

Free to use

You're free to use this package, but if it makes it to your production environment we highly appreciate you stating credits to us:

We are: Skotner Gruppen AS - www.skotner.no - Norway

Credits

License

The MIT License (MIT). Please see License File for more information.