eslym/laravel-easy-theme

Easy Theme System For Laravel

1.0.3 2019-04-15 04:42 UTC

This package is auto-updated.

Last update: 2024-11-29 05:39:15 UTC


README

Install

composer require eslym/laravel-easy-theme

Without package discovery

Provider

[
    "Eslym\\EasyTheme\\Providers\\ThemeServiceProvider"
]

Alias

[
    "Theme" => "Eslym\\EasyTheme\\Facades\\Theme"
]

Publish

php artisan vendor:publish --provider="Eslym\EasyTheme\Providers\ThemeServiceProvider" --tag="config"

How to use

Structure

public/
└── themes/
     ├── default
     │   └── index.blade.php
     └── theme_b
          └── index.blade.php

Code

Route::get('/', function(){
    return Theme::view('index')
        ->response();
});