Download the PHP package elegantly/laravel-referrer without Composer
On this page you can find all versions of the php package elegantly/laravel-referrer. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download elegantly/laravel-referrer
More information about elegantly/laravel-referrer
Files in elegantly/laravel-referrer
Package laravel-referrer
Short Description Remember User Origin
License MIT
Homepage https://github.com/elegantengineeringtech/laravel-referrer
Informations about the package laravel-referrer
Remember the Visitor Referrer Across Requests
This small package allows you to detect and store the visitor referrer so that you can access it later.
A typical use case would be saving the referrer in a database when a visitor registers in your app.
The package is designed to be flexible regarding:
- How you want to detect the referrer
- How you want to store the referrer value
Installation
You can install the package via Composer:
Usage
Capturing the Visitor Referrer
First, publish the config file with:
This is the content of the published config file:
In the file, enable one or more drivers by setting a value for the key
.
Next, add the CaptureReferrerMiddleware
to your route:
Retrieving the Visitor Referrer
You can retrieve the referrer sources using the facade:
Here is a full example inside a controller:
Testing
Changelog
Please see CHANGELOG for more information on what has changed recently.
Contributing
Please see CONTRIBUTING for details.
Security Vulnerabilities
Please review our security policy for information on how to report security vulnerabilities.
Credits
- Quentin Gabriele
- All Contributors
License
The MIT License (MIT). Please see the License File for more information.
All versions of laravel-referrer with dependencies
spatie/laravel-package-tools Version ^1.16
illuminate/contracts Version ^11.0