proxitok/app/Controllers/DiscoverController.php

19 lines
446 B
PHP
Raw Normal View History

2022-02-05 18:58:30 -05:00
<?php
namespace App\Controllers;
use App\Helpers\ErrorHandler;
use App\Helpers\Wrappers;
2022-02-16 09:20:35 -05:00
use App\Models\FeedTemplate;
2022-02-05 18:58:30 -05:00
class DiscoverController {
static public function get() {
$api = Wrappers::api();
2022-05-24 08:10:41 -04:00
$feed = $api->discover();
2022-02-05 18:58:30 -05:00
if ($feed->meta->success) {
2022-11-04 15:08:19 -04:00
Wrappers::latte('discover', new FeedTemplate('Discover', $feed));
2022-02-05 18:58:30 -05:00
} else {
2022-09-03 08:01:03 -04:00
ErrorHandler::showMeta($feed->meta);
2022-02-05 18:58:30 -05:00
}
}
}