Skip to content

Releases: leafsphp/http

🌪️ Waterspout '1'

10 Nov 23:00
c0553e5
Compare
Choose a tag to compare

v3.0.1 - 10 Nov 2024

Fixed

  • Patched up rare error generated when a user sends an empty form

🌪️ Waterspout

10 Nov 09:44
Compare
Choose a tag to compare

v3.0 - 10 Nov 2024

Changed

  • No real changes, just new version constraints

🌪️ Tornado

06 Nov 22:41
Compare
Choose a tag to compare

v2.8 - 6 Nov 2024

Added

  • Added internal instance of Leaf form validator

💨 Gust

01 Oct 16:37
Compare
Choose a tag to compare

v2.7 - 1 October 2024

Added

  • Added Response::next() for passing middleware data by @mychidarko
  • Added Response::js() for text/javascript output by @Rasalas

Fixed

  • Allowed responses with custom Content-Type by @Rasalas

🌪️ Cyclone

16 Sep 17:58
Compare
Choose a tag to compare

v2.6 - 16 Sep 2024

Added

  • Added Request::getOrDefault() method
  • Added Request::query() method
  • Added Request::next() method
  • Added Response::die() method

💨 Wind man

25 Aug 02:20
Compare
Choose a tag to compare

v2.5 - 25 August 2025

Added

  • Merged auth errors into request::errors() for easier use of request::auth

Fixed

  • Fixed response::redirect ignoring application base
  • Removed dependance on MVC-only features

Changed

  • Updated to Leaf's new config API
  • Changed store() and storeAs() to upload()/uploadAs()

v2.4.0

09 Aug 19:15
c14b208
Compare
Choose a tag to compare
  1. 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 as max_file_size, file_type, and extensions.
    • Returns: An object containing status, path, and error 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;
  1. 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 as max_file_size, file_type, and extensions.
    • Returns: An object containing status, path, and error 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

24 Aug 22:57
Compare
Choose a tag to compare

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)

🌤️ Sun Man '3'

20 Apr 20:45
Compare
Choose a tag to compare

v2.2.3 - 20 Apr 2023

Fixed

  • Updated Response::download method with new headers

🌤️ Sun Man '2'

05 Feb 18:44
47a8f58
Compare
Choose a tag to compare

v2.2.2. - 5 Feb 2023

Fixed

  • Fixed header case sensitivity (#12)