summaryrefslogtreecommitdiff
path: root/resources/views/filecollection.blade.php
blob: f89ac028dd422478bb35c460a4bf6d1f6575b540 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
@extends('template')
<?php
    use Illuminate\Support\Facades\Storage;
    //this page is intended to be used for specific collections of files relevant to groups of users, such as photos and videos from some event that they want to share with each other

    $files = Storage::disk('public')->files('sheeshbb');

    // Filter out unwanted files (like .gitignore)
    $files = array_filter($files, function($file) {
        // Add any file filtering logic here if needed
        return !str_starts_with(basename($file), '.');
    });

    // Prepare file data for display
    $fileData = [];
    foreach ($files as $file) {
        $fileData[] = [
            'name' => basename($file),
            'path' => $file,
            'url' => Storage::disk('public')->url($file),
            'size' => Storage::disk('public')->size($file),
            'last_modified' => Storage::disk('public')->lastModified($file),
        ];
    }
?>