Releases: leafsphp/http
Releases · leafsphp/http
💨 Gust
v2.7 - 1 October 2024
Added
- Added
Response::next()for passing middleware data by @mychidarko - Added
Response::js()fortext/javascriptoutput by @Rasalas
Fixed
- Allowed responses with custom
Content-Typeby @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::redirectignoring application base - Removed dependance on MVC-only features
Changed
- Updated to Leaf's new config API
- Changed
store()andstoreAs()toupload()/uploadAs()
v2.4.0
-
storeMethod:- 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, anderrormessage. - 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;-
storeAsMethod:- 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, anderrormessage. - 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-TYPEheader bug (#17)
🌤️ Sun Man '3'
v2.2.3 - 20 Apr 2023
Fixed
- Updated
Response::downloadmethod with new headers
🌤️ Sun Man '2'
🌤️ Sun Man '1'
v2.2.1 - 22 Dec 2022
Fixed
- Fixed cookie requirement
🌤️ Sun Man
v2.2.0 - 23 Oct 2022
Added
- Added support for Eien
- Add support for request headers
Fixed
- Patch up HTTP status
- Fixed Content-Type json UTF-8
- Fix falsy values not showing
- Fix patch up strpos error
Changed
- Add cookie array
🌧️ Rain Man '1'
v2.1.1 - 2 October 2022
Added
- Added support for other request types
- Added support for whole string request bodies
Fixed
- Fixed
inputreturning a string for non-json requests