PHP code example of anisaronno / laravel-media-helper
1. Go to this page and download the library: Download anisaronno/laravel-media-helper library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
anisaronno / laravel-media-helper example snippets
use AnisAronno\MediaHelper\Facades\Media;
Media::upload($request, $fieldName, string $upload_dir)
use AnisAronno\MediaHelper\Facades\Media;
Media::setStorageDisk('public')->upload($request, $fieldName, string $upload_dir)
use AnisAronno\MediaHelper\Facades\Media;
Media::getURL($path)
use AnisAronno\MediaHelper\Facades\Media;
Media::setStorageDisk('public')->getURL($path)
use AnisAronno\MediaHelper\Facades\Media;
Media::delete($path)
use AnisAronno\MediaHelper\Facades\Media;
Media::setStorageDisk('public')->delete($path)
use AnisAronno\MediaHelper\Facades\Media;
Media::getDefaultFilesURL();