This commit is contained in:
Edward Yang 2022-07-15 16:34:04 +08:00
parent 91ece063b4
commit cfce41dac3
2 changed files with 19 additions and 0 deletions

View File

@ -9,6 +9,7 @@ use Illuminate\Support\Facades\View;
use Illuminate\Support\Facades\Config;
use Illuminate\Support\ServiceProvider;
use Beike\Shop\View\Components\AccountSidebar;
use Illuminate\View\FileViewFinder;
class ShopServiceProvider extends ServiceProvider
{
@ -28,6 +29,13 @@ class ShopServiceProvider extends ServiceProvider
$this->mergeConfigFrom(__DIR__ . '/../../Config/beike.php', 'beike');
$this->registerGuard();
$this->app->bind('view.finder', function ($app) {
$paths = $app['config']['view.paths'];
$customTheme[] = base_path('themes/black');
$paths = array_merge($customTheme, $paths);
return new FileViewFinder($app['files'], $paths);
});
$this->app->booted(function () {
$this->loadShareViewData();
});

View File

@ -0,0 +1,11 @@
@extends('layout.master')
@section('body-class', 'page-home')
@section('content')
黑色模板开始
{!! $html !!}
黑色模板结束
@endsection