PHP code example of padosoft / laravel-request
1. Go to this page and download the library: Download padosoft/laravel-request 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/ */
padosoft / laravel-request example snippets
use Padosoft\Laravel\Request\RequestHelper;
if(RequestHelper::currentRequestHasFiles()){
echo 'current request has file uploaded!';
}
if(RequestHelper::isValidCurrentRequestUploadFile('items_image', ['image/jpg','image/png'])){
echo 'current request has a valid file uploaded!';
}
$uploadedFile = RequestHelper::getCurrentRequestFileSafe('items_image');
var_dump($uploadedFile);