Reports

Please provide an email address where the reports will be sent to.
In your config/tnt-analytics.php file, set the report_email field
Starting The Scheduler

TNT Analytics is capable of sending you search reports on a daily, weekly, or monthly basis.

To get started, you need to enable Laravel's command scheduler by adding the following Cron entry to your server.


* * * * * cd /path-to-your-project && php artisan schedule:run >> /dev/null 2>&1

and run

php artisan schedule:work

For more information on how to start the scheduler, please visit Laravel's documentation


Scheduling reports
Reports can be sent in three different periods - daily, weekly and monthly.

  • tnt-analytics:daily
  • tnt-analytics:weekly
  • tnt-analytics:monthly
Defining Schedules

$schedule->command('tnt-analytics:daily')->daily();

$schedule->command('tnt-analytics:weekly')->weekly();

$schedule->command('tnt-analytics:monthly')->monthly();

Example

    namespace App\Console;

    use Illuminate\Console\Scheduling\Schedule;
    use Illuminate\Foundation\Console\Kernel as ConsoleKernel;

    class Kernel extends ConsoleKernel
    {
        /**
         * The Artisan commands provided by your application.
         *
         * @var  array
         */
        protected $commands = [
        ];

        /**
         * Define the application's command schedule.
         *
         * @param    \Illuminate\Console\Scheduling\Schedule  $schedule
         * @return  void
         */
        protected function schedule(Schedule $schedule)
        {
            $schedule->command('tnt-analytics:daily')->daily();
        }

        /**
         * Register the commands for the application.
         *
         * @return  void
         */
        protected function commands()
        {
            $this->load(__DIR__.'/Commands');

            require base_path('routes/console.php');
        }
    }