-
app/Providers/ThemeComponentsServiceProvider.php
Open in GitHubuse Illuminate\Support\ServiceProvider; use Illuminate\Support\Facades\Blade; class ThemeComponentsServiceProvider extends ServiceProvider { // public function boot() { Blade::if('vimeo', function ($expression) { return $expression === "vimeo"; }); Blade::if('html5', function ($expression) { return (($expression === "local") || ($expression === "s3")); }); Blade::if('youtube', function ($expression) { return $expression === "youtube"; }); Blade::if('IsMovie', function ($expression) { return $expression === "movies"; }); Blade::if('IsSeries', function ($expression) { return $expression === "series"; }); } }
-
resources/themes/default/trailer/show.blade.php
Open in GitHub// @section('content') <div class="container"> <div class="row"> <div class="col-12"> @vimeo($item->video_storage) <div class="plyr__video-embed" id="player"> <iframe src="{{ Asset::video($item->video_name, $item->video_storage) }}"></iframe> </div> @endvimeo @html5($item->video_storage) <video id="player" playsinline controls> <source src="{{ Asset::video($item->video_name, $item->video_storage) }}"> </video> @endhtml5 @youtube($item->video_storage) <div class="plyr__video-embed" id="player"> <iframe src="{{ Asset::video($item->video_name, $item->video_storage) }}"></iframe> </div> @endyoutube </div> </div> // @endsection
-
config/app.php
Open in GitHubreturn [ // 'providers' => [ // App\Providers\ThemeComponentsServiceProvider::class, // ], // ];