Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

SilverGround's avatar

Is it possible to use Google Drive's api to display content with Laravel ?

Hi, I have around 200 videos on a drive and I wonder if I can display them on my website with an api ? Instead of downloading them and putting them into my website's assets

Any idea on how to do this ?

0 likes
1 reply
knox's avatar

This looks like a good start

https://robindirksen.nl/blog/google-drive-storage-as-filesystem-in-laravel

At the end you could do something like this in your controller:

$files = cache()->remember('google_files', now()->addDay(), fn() => Storage::disk('google')->allFiles());
return view('videos',compact('files'));

Then in your blade:

<ul>
@foreach($files as $file)
<li>{{ $file }}</li>
@endforeach
</ul>
2 likes

Please or to participate in this conversation.