GeneaLabs /
laravel-mixpanel
| 1 | <?php namespace GeneaLabs\LaravelMixpanel\Events; |
||
| 2 | |||
| 3 | use Illuminate\Queue\SerializesModels; |
||
| 4 | use Illuminate\Support\Collection; |
||
| 5 | |||
| 6 | class MixpanelEvent |
||
| 7 | { |
||
| 8 | use SerializesModels; |
||
|
0 ignored issues
–
show
introduced
by
Loading history...
|
|||
| 9 | |||
| 10 | public $charge; |
||
| 11 | public $profileData; |
||
| 12 | public $trackingData; |
||
| 13 | public $user; |
||
| 14 | |||
| 15 | public function __construct($user, array $trackingData, int $charge = 0, array $profileData = []) |
||
| 16 | { |
||
| 17 | $this->charge = $charge; |
||
| 18 | $this->trackingData = $trackingData; |
||
| 19 | $this->profileData = $profileData; |
||
| 20 | $this->user = $user; |
||
| 21 | } |
||
| 22 | |||
| 23 | public function names() : Collection |
||
| 24 | { |
||
| 25 | return collect($this->trackingData) |
||
| 26 | ->keys(); |
||
| 27 | } |
||
| 28 | } |
||
| 29 |