añadir nuevas funcionalidades

This commit is contained in:
2025-04-30 20:56:28 +02:00
parent 883daf32ed
commit 655ea60d6b
71 changed files with 3836 additions and 1158 deletions

View File

@@ -0,0 +1,23 @@
<?php
// En App\Helpers\FileHelper.php
namespace App\Helpers;
class FileHelper
{
public static function getFileType($filename)
{
$extension = strtolower(pathinfo($filename, PATHINFO_EXTENSION));
return match($extension) {
'pdf' => 'pdf',
'doc', 'docx' => 'word',
'xls', 'xlsx' => 'excel',
'ppt', 'pptx' => 'powerpoint',
'jpg', 'jpeg', 'png', 'gif' => 'image',
'zip', 'rar' => 'archive',
'txt' => 'text',
default => 'document'
};
}
}