-
-
Notifications
You must be signed in to change notification settings - Fork 3
Installation
Johnny Mast edited this page May 30, 2020
·
3 revisions
We don't require much, but these are the minimum requirements for using Redbox-tracker.
- PHP 7.3
- Laravel 7 or higher
There is one additional requirement if you are contributing to this package.
For development on the package itself, we require pdo_sqlite
for testing.
The package can be installed using composer.
composer require redbox/tracker
The package will automatically register itself.
Publish configuration file:
php artisan vendor:publish --provider="Redbox\Tracker\Providers\TrackerServiceProvider"
Install the database tables:
php artisan migrate
Create a listener for new visitors in your project:
php artisan make:listener NewvisitorListener
In App\Providers\EventServiceProvider
add
use Redbox\Tracker\Events\NewVisitorNotification;
And update the $listen
array with:
protected $listen = [
Registered::class => [
SendEmailVerificationNotification::class,
],
NewVisitorNotification::class => [
\App\Listeners\NewvisitorListener::class,
]
];