0

I want to display a multiple videos stored with Laravel Voyager in the frontend, I'm attempting to pull out my videos uploaded through admin with this:

@foreach ($videos as $video)
    <video width="320" height="240" controls>
        <source src="{{ Voyager::image( $video->file) }}" type="video/mp4">
    </video>
@endforeach

But it doesn't work, can someone help?

Ozan Kurt
  • 3,731
  • 4
  • 18
  • 32
PRANK HB
  • 1
  • 2

1 Answers1

1

you can call it directly from storage like this :

@foreach ($videos as $video)
   <video width="320" height="240" controls>
        <source src="{{ Storage::url($video->file) }}" type="video/mp4">
       // Or 
   <source src="{{ asset("storage/$video->file") }}" type="video/mp4">
      </video>
@endforeach
Mohamed Kamel
  • 841
  • 10
  • 15