Skip to content

Releases: leafsphp/http

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)

🌤️ Sun Man '1'

22 Dec 01:45
Compare
Choose a tag to compare

v2.2.1 - 22 Dec 2022

Fixed

  • Fixed cookie requirement

🌤️ Sun Man

23 Oct 15:53
Compare
Choose a tag to compare

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'

02 Oct 17:48
Compare
Choose a tag to compare

v2.1.1 - 2 October 2022

Added

  • Added support for other request types
  • Added support for whole string request bodies

Fixed

  • Fixed input returning a string for non-json requests

🌧️ Rain Man

07 Sep 09:18
Compare
Choose a tag to compare

v2.1.0 - 7 Sep 2022

Added

Fixed

  • Fixed 1 displayed when page is used (16095b0)
  • Updated Leaf Anchor (57d5724)

Changed

  • Switched internal getters to new methods (934c532)

Weather man 🌤

29 May 16:52
Compare
Choose a tag to compare

v2.0 - 29 May 2022

Added

  • Added method chaining (1100cf2)
  • Added xml method to response (39bc5ff)
  • Added withHeader method to response (795e927)
  • Added status code helper (d3c7026)
  • Added withCookie method on response (508c670)
  • Added withFlash method on response (f46118f)
  • Added has method on Headers (bd51313)
  • Added response noContent (d1de313)

Fixed

  • Fixed incorrect references (814ac08)
  • Added support for x-www-form-urlencoded (aead66a)

Changed

  • Rewrote base of response (1100cf2)
  • Updated functional mode base (37d523e)
  • Updated internals (83b0c59)
  • Standardized functional mode (bce6cda)
  • Updated code labels (69a3b5b)
  • Updated json method on Response (429580d)
  • Updated response redirect (d1de313)
  • Updated cookie types (6afa66e)

Removed

  • Removed cache control headers (6870ffe)
  • Removed constructor (47cd93f)
  • Removed CORS from response (a9cabbd)
  • Removed headers instance on response
  • Removed cookies instance on response

v1.2.1

20 Jan 09:47
Compare
Choose a tag to compare

Added

  • Added strict types
  • Added content XML method
  • Added download method on response
  • Added plain response type

Fixed

  • Fixed PHP 8 type bug on headers
  • Refactored the entire codebase
  • Fixed HTTP code bug

Changed

  • Updated minimum stability
  • Switched to camel case variables