PHP Classes

File: src/Helpers.php

Recommend this page to a friend!
  Classes of Moamen Eltouny   Laravel Upload File Manager   src/Helpers.php   Download  
File: src/Helpers.php
Role: Example script
Content type: text/plain
Description: Example script
Class: Laravel Upload File Manager
Manage the upload of public and private files
Author: By
Last change:
Date: 3 years ago
Size: 479 bytes
 

Contents

Class file image Download
<?php

use Illuminate\Http\UploadedFile;
use
RaggiTech\Laravel\Uploader\Upload;

/**
 * Upload File
 *
 * @var Illuminate\Http\UploadedFile $file
 * @var RaggiTech\Laravel\Uploader\Upload|null $perv
 * @var array|null $options
 */
function upload(UploadedFile $file, array $options = [])
{
    return
Upload::upload($file, $options);
}

/**
 * Get Upload File
 *
 * @var string $hash
 */
function getUploaded(string $hash)
{
    return
Upload::where('hash', $hash)->first();
}