@extends('layouts.admin') @section('title', 'Vidéos') @section('content')

Vidéos

Nouvelle vidéo
@if (session('success')) @endif
@forelse ($videos as $video)
@php $MediaEmbed = new \MediaEmbed\MediaEmbed(); $MediaObject = $MediaEmbed->parseUrl($video->fichier); $image = $MediaObject->image() @endphp

{{ Str::limit($video->titre, 30) }}

Ajoutée le {{ date("d M Y à H:i", strtotime($video->created_at)) }} {{ $video->user ? ' | Par '.$video->user->name : '' }}
{!! Form::model($video, ['method' => 'DELETE', 'id'=>'video'.$video->id, "url" => route('admin-cnp.videos.destroy', $video)]) !!} @csrf {!! Form::close() !!}
@empty {{"Pas encore de vidéos"}} @endforelse
@if ($videos)
{{ $videos->links() }}
@endif
@endsection