eslym/laravel-easy-theme

为Laravel的简易主题系统

1.0.3 2019-04-15 04:42 UTC

This package is auto-updated.

Last update: 2024-09-29 05:21:44 UTC


README

安装

composer require eslym/laravel-easy-theme

无包发现

提供者

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

别名

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

发布

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

如何使用

结构

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

代码

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