composer require fairhypo/agroutm
Library for Agro24 project to add some utm functionality., (*1)
Installation
Pull this package in through Composer., (*2)
{
"require": {
"fairhypo/agroutm": "^1.0"
}
}
Laravel 5.* Integration
Add the service provider to your config/app.php file:, (*3)
'providers' => array(
//...
Fairhypo\Agroutm\AgroutmServiceProvider::class,
),
Publish the migrations, (*4)
php artisan vendor:publish --provider="Fairhypo\Agroutm\AgroutmServiceProvider"
... and use it, (*5)
php artisan migrate
Add the middleware to your App\Http\Kernel.php file:, (*6)
protected $routeMiddleware = [
//...
'agroutm' => \Fairhypo\Agroutm\Middleware\AgroUtm::class,
];
Then use in your routes:, (*7)
Route::get('/', function () {
//
})->middleware('agroutm');
... or include into other middleware:, (*8)
protected $middlewareGroups = [
'web' => [
//...
'agroutm',
],
//...
];
Usage
Using Agroutm middleware
You do not need to do something else. Just test that everything works fine., (*9)
License
This package is open-sourced software licensed under the MIT license, (*10)
Yuriy Maslov (developer), (*11)
- Email: yuriy.maslof@gmail.com