padosoft / laravel-request
Laravel Package to interact with Illuminate Request and Files Upload.
2.3.0
2022-04-05 10:51 UTC
Requires
- php: >=7.1
- illuminate/http: ^5.8|^6.0|^7.0|^8.0|^9.0
- illuminate/support: ^5.8|^6.0|^7.0|^8.0|^9.0
- padosoft/io: ^1.9
Requires (Dev)
- mockery/mockery: ^0.9.9|^1.0
- orchestra/testbench: ^3.8|^4.0|^5.0|^6.0|^7.0|^8.0|^9.0
- padosoft/test: ^1.0.1|^2.1
- phpunit/phpunit: ^7.0|^8.0|^9.0
- roave/security-advisories: dev-latest
README
This package provides a series of class to interact with Illuminate Request and Files Upload.
##Requires
- php: >=7.1
- illuminate/support: ^5.8
- illuminate/http: ^5.8
- padosoft/io: ^1.0
Installation
You can install the package via composer:
$ composer require padosoft/laravel-request
Usage
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);
NOTE:
For all methods and helpers check the source code.
Change log
Please see CHANGELOG for more information what has changed recently.
Testing
$ composer test
Contributing
Please see CONTRIBUTING for details.
Security
If you discover any security related issues, please email instead of using the issue tracker.
Credits
About Padosoft
Padosoft (https://www.padosoft.com) is a software house based in Florence, Italy. Specialized in E-commerce and web sites.
License
The MIT License (MIT). Please see License File for more information.