-
Notifications
You must be signed in to change notification settings - Fork 113
1. Installation
Giannis Gasteratos edited this page Apr 30, 2018
·
4 revisions
Very simple, you create a folder for each Theme in 'resources/views' and keep all your views separated.
The same goes for assets: create a folder for each theme in your 'public' directory. Set your active theme and you are done.
The rest of your application remains theme-agnostic©, which means that when you View::make('index')
you will access the index.blade.php
from your selected theme's folder. Same goes for your assets.
install with
composer require "igaster/laravel-theme"
If you’re on Laravel 5.4 or earlier, you’ll need to add the following to your config/app.php
(for Laravel 5.5+ these will be auto-discovered by Laravel):
'providers' => [
// ...
Igaster\LaravelTheme\themeServiceProvider::class,
];
'aliases' => [
// ...
'Theme' => Igaster\LaravelTheme\Facades\Theme::class,
]
Almost Done. You can optionally publish a configuration file to your application with
php artisan vendor:publish --provider="Igaster\LaravelTheme\themeServiceProvider"
That's it. You are now ready to start theming your applications!