AltThree/Segment: A Segment Bridge For Laravel. - GitHub
Có thể bạn quan tâm

Installation
Alt Three Segment is a Segment bridge for Laravel. This version requires PHP 7.1-7.4, and supports Laravel 5.5-8. Simply require the package using Composer:
$ composer require alt-three/segment:^3.5Once installed, if you are not using automatic package discovery, then you need to register the AltThree\Segment\SegmentServiceProvider service provider in your config/app.php.
Configuration
Alt Three Segment requires configuration.
To get started, you'll need to publish all vendor assets:
$ php artisan vendor:publishThis will create a config/segment.php file in your app that you can modify to set your configuration. Also, make sure you check for changes to the original config file in this package between releases.
Usage
Once you've set your write_key value in the configuration, you're ready to go! For the most part you can follow Segments own instructions however, you'll want to replace the Analytics classname with Segment - plus, you don't need to call class_alias.
Identify the user
Segment::identify([ 'userId' => '12345abcde', 'traits' => [ 'name' => 'James Brooks', 'email' => '[email protected]', ], ]);Track actions
Segment::track([ 'userId' => '12345abcde', 'event' => 'Did something', 'properties' => [ 'was_awesome' => true, ], ]);Security
Our full security policy is available to read here.
License
Alt Three Segment is licensed under The MIT License (MIT).
Từ khóa » How To Use Segment In Laravel
-
How To Access URL Segment(s) In Blade In Laravel 5? - Stack Overflow
-
Laravel Get Url Segment Code Example
-
How To Access Url Segment In Controller In Laravel 5.2 - Laracasts
-
Get Current URL With Parameters In Laravel 6, 7 & 8 - SkillSugar
-
How To Get URL Segment In Laravel?
-
Requests & Input - Laravel - The PHP Framework For Web Artisans
-
How To Get URL Segment In Laravel? - Onlinecode
-
How To Access Url Segments In Blade In Laravel 5
-
Analytics For PHP | Segment Documentation
-
Laravel Get Url Segment - MaxInterview
-
How To Get URL Segment In Laravel? - NiceSnippets
-
Get URL Segments In Controller And Blade Using Laravel
-
Laravel Segment Is An Opinionated, Approach To Integrating ...
-
Laravel Get URL Segment Example Tutorial