<?php

namespace {{ appNamespace }}\Controllers\Api;

class {{ endpointPascalCase }} extends \Hubleto\Erp\Controllers\ApiController
{

  // Uncomment this if you want to make your controller publicly
  // available without need for authentication.
  // public bool $requiresAuthenticatedUser = false;

  /**
   * Returns JSON data to be rendered as output.
   * https://developer.hubleto.euhubleto.eu/v0/docs/controllers
   *
   * @return void
   * 
   */
  public function renderJson(): array
  {

    // Uncomment this to fire an event
    // $this->eventManager()->fire('onApiBeforeRenderJson', [$this]);

    // Uncomment example below to provide data for a specific model
    // $mCountry = $this->getModel(\Hubleto\App\Community\Settings\Models\Country::class);
    // return $mCountry->record->get()?->toArray();

    return [
      'status' => 'success',
      'message' => 'This endpoint has been generated by `php hubleto create api` command.'
    ];
  }

}
