Releases: leafsphp/http
Releases · leafsphp/http
🎐 Downburst
v3.2 - 6 Dec 2024
Added
- Added named route redirects with params by @phederal
Fixed
- Normalize request path methods, thanks @patrickvuarnoz
🎐 Wind Shear
v3.1 - 4 Dec 2024
Fixed
- Fixed warnings on PHP 8.4 by @joanhey
- Removed parsing on external URLs for redirects by @mychidarko
🌪️ Waterspout '1'
v3.0.1 - 10 Nov 2024
Fixed
- Patched up rare error generated when a user sends an empty form
🌪️ Waterspout
v3.0 - 10 Nov 2024
Changed
- No real changes, just new version constraints
🌪️ Tornado
v2.8 - 6 Nov 2024
Added
- Added internal instance of Leaf form validator
💨 Gust
v2.7 - 1 October 2024
Added
- Added
Response::next()
for passing middleware data by @mychidarko - Added
Response::js()
fortext/javascript
output by @Rasalas
Fixed
- Allowed responses with custom
Content-Type
by @Rasalas
🌪️ Cyclone
v2.6 - 16 Sep 2024
Added
- Added
Request::getOrDefault()
method - Added
Request::query()
method - Added
Request::next()
method - Added
Response::die()
method
💨 Wind man
v2.5 - 25 August 2025
Added
- Merged auth errors into
request::errors()
for easier use ofrequest::auth
Fixed
- Fixed
response::redirect
ignoring application base - Removed dependance on MVC-only features
Changed
- Updated to Leaf's new config API
- Changed
store()
andstoreAs()
toupload()
/uploadAs()
v2.4.0
-
store
Method:- Purpose: This method stores a file from the request to a specified directory.
- Parameters:
string $key
: The name of the file input in the request.string $destination
: The directory where the file should be stored.array $configs
: Optional configurations such asmax_file_size
,file_type
, andextensions
.
- Returns: An object containing
status
,path
, anderror
message. - Benefit: Allows for validating file extensions and size limits, providing more granular control over file uploads.
# without options
request::store('file', '/uploads/directory')
# with options
request::store('file', '/uploads/directory', [
'extensions' => 'extensions' => ['jpg', 'jpeg', 'png', 'gif']
]
// output: FsInstance::$uploadInfo;
-
storeAs
Method:- Purpose: This method stores a file from the request with a specific name.
- Parameters:
string $key
: The name of the file input in the request.string $destination
: The directory where the file should be stored.string $filename
: The name to give the stored file.array $configs
: Optional configurations such asmax_file_size
,file_type
, andextensions
.
- Returns: An object containing
status
,path
, anderror
message. - Benefit: Provides the ability to rename files upon upload, in addition to validating extensions and size limits.
# without options
request::storeAs('file', '/uploads/directory', 'myNewName')
# with options
request::storeAs('file', '/uploads/directory', 'myNewName', [
'file_type' => 'image',
'max_file_size' => 10
]
// output: FsInstance::$uploadInfo;
🌨️ Snow Man
v2.3.0 - 24 Aug 2023
Added
- Added
request()->validate()
method - Added
request()->user()
method - Added
request()->errors()
method
Fixed
- Patched up
CONTENT-TYPE
header bug (#17)