proxitok/app/Controllers/DiscoverController.php
2023-01-26 19:21:14 +01:00

19 lines
442 B
PHP

<?php
namespace App\Controllers;
use App\Helpers\ErrorHandler;
use App\Helpers\Wrappers;
use App\Models\DiscoverTemplate;
class DiscoverController {
static public function get() {
$api = Wrappers::api();
$data = $api->discover();
if ($data->meta->success) {
Wrappers::latte('discover', new DiscoverTemplate($data));
} else {
ErrorHandler::showMeta($data->meta);
}
}
}