Download the PHP package dragon-code/laravel-http-user-agent without Composer
On this page you can find all versions of the php package dragon-code/laravel-http-user-agent. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download dragon-code/laravel-http-user-agent
More information about dragon-code/laravel-http-user-agent
Files in dragon-code/laravel-http-user-agent
Package laravel-http-user-agent
Short Description Passing your own User Agent in all Http requests
License MIT
Informations about the package laravel-http-user-agent
HTTP User Agent for Laravel
FAQ
- Q: What problem does this package solve?
- A: In cases where it is necessary to explicitly specify the value
User-Agentin outgoing requests. In other cases it is not necessary.
Installation
Basic Usage
It's all. Really 😎
When a package is installed, it will automatically specify the value of the User-Agent header in the following
format (by default):
For example:
where:
Site Name- value of theAPP_NAMEenvironment parameter1.0- specific version of the application. If theversionparameter is specified in thecomposer.jsonfile, its value will be taken, otherwise1.0will be used by default.https://example.com- value of theAPP_URLenvironment parameter[email protected]- value of theMAIL_FROM_ADDRESSenvironment parameter
If you want to change this value, add a new parameter APP_USER_AGENT to the .env file.
For example:
Now, the value of the User-Agent header in all external Http requests will be specified
as Cool Site - https://the-best.example.com.
Configuration
If you need direct access to the configuration file, you can publish it to your application by calling the following console command:
As a result of its execution, the file config/http.php will be created.
You can also disable value assignment through the environment settings:
License
This package is licensed under the MIT License.
All versions of laravel-http-user-agent with dependencies
illuminate/config Version ^10.0 || ^11.0
illuminate/http Version ^10.0 || ^11.0
illuminate/support Version ^10.0 || ^11.0
symfony/polyfill-php83 Version ^1.29