<?php
namespace CodeDay\Clear\Controllers\Api;

use \CodeDay\Clear\Models;
use \CodeDay\Clear\ModelContracts;

class Stats extends ApiController {
  public function getIndex(){
    $this->requirePermission(["internal"]);
    $registrations = Models\Batch\Event\Registration::count();

    return json_encode([
      "registrations_all_time" => $registrations
    ]);
  }
}

<?php
namespace CodeDay\Clear\Controllers\Api;

use \CodeDay\Clear\Models;
use \CodeDay\Clear\ModelContracts;

class Stats extends ApiController {
  public function getIndex(){
    $this->requirePermission(["internal"]);
    $registrations = Models\Batch\Event\Registration::count();
    $events = Models\Batch\Event::count();
    $batches = Models\Batch::count();

    return json_encode([
      "registrations_all_time" => $registrations,
      "events_all_time" => $events,
      "batches_all_time" => $batches
    ]);
  }
}

Add `events_all_time` and `batches_all_time` to /api/stats
Add `events_all_time` and `batches_all_time` to /api/stats
