Skip to content

Installation

Johnny Mast edited this page May 30, 2020 · 3 revisions

Prerequisites

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.

Installation

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,
        ]
    ];
Clone this wiki locally