Download the PHP package drewlabs/laravel-http without Composer
On this page you can find all versions of the php package drewlabs/laravel-http. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download drewlabs/laravel-http
More information about drewlabs/laravel-http
Files in drewlabs/laravel-http
Package laravel-http
Short Description Provides bridge to laravel framework HTTP components
License MIT
Informations about the package laravel-http
Package documentation
The drewlabs/http
package provides utility classes and functions for unified HTTP response API and middleware classes for handling CORS.
Providers
By default providers are automatically registered when running Laravel application after composer finishes installing the package.
- For Lumen appliation we must manually register the providers in the bootstrap/app.php:
Cors Middleware
To use the cors middleware in your application add the following code to your kernel based on the framework being used:
-
Laravel
- Lumen
Note In order to allow any host
or method
, or headers
use the *
in the matching key of the config array.
EmptyStringToNull Middleware
It's a midleware that convert all empty string query parameteres and empty request body entry to null.
- Laravel
Note: Laravel already provide implementation for such case. But if you still want to use the current package middleware do it as follow.
- Lumen
Http package configuration
This configuration file contains middleware aliases keys definition for the application Http request handlers, like auth, policy middlewares.
- Publishing the configuration files
php artisan vendor:publish --tag="drewlabs-http"
All versions of laravel-http with dependencies
illuminate/http Version ^9.0|^10.0|^11.0
illuminate/container Version ^9.0|^10.0|^11.0
psr/http-message Version ^1.0|^2.0
drewlabs/http-contracts Version ^0.2
drewlabs/core-helpers Version ^0.3
drewlabs/contracts Version ^0.3
drewlabs/cors Version ^0.2.0
drewlabs/overloadable Version ^0.1.10|^0.3