famdirksen / laravel-utm-urls
This package will add utm attributes to all urls
Requires
- php: >=5.6
- illuminate/support: 5.0.*|5.1.*|5.2.*|5.3.*|5.4.*|5.5.*|5.6.*|5.7.*|5.8.*|6.*|7.*|8.*
Requires (Dev)
- phpunit/phpunit: >=5.4.3
- squizlabs/php_codesniffer: ^2.3
This package is auto-updated.
Last update: 2024-12-08 16:49:54 UTC
README
Install
Via Composer
$ composer require famdirksen/laravel-utm-urls
Usage
Add the \Famdirksen\LaravelUTMUrls\Middleware\SetUTMUrls::class
to your app/Http/Kernel.php
. Thisway all the url's on your site will have the UTM attributes from the config file (utm-urls.php
) added.
To disable the UTM attributes appended to a url on specific routes, you can add the follow middleware to the route or group: \Famdirksen\LaravelUTMUrls\Middleware\DisableUTMUrls::class
. This will set the header x-do-not-append-campagne
so it won't append the UTM attributes.
You can publish the config file with:
php artisan vendor:publish --provider="Famdirksen\LaravelUTMUrls\LaravelUTMUrlsServiceProvider"
Testing
$ composer test
Security
If you discover any security related issues, please email info@famdirksen.nl instead of using the issue tracker.
Credits
License
The MIT License (MIT). Please see License File for more information.