proxitok/app/Controllers/DiscoverController.php
2022-11-04 20:08:19 +01:00

19 lines
446 B
PHP

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