mirror of
https://github.com/Poniverse/Pony.fm.git
synced 2024-12-02 09:37:59 +01:00
22 lines
620 B
PHP
22 lines
620 B
PHP
<?php
|
|
|
|
namespace Poniverse\Ponyfm\Http\Controllers\Api\Web;
|
|
|
|
use Response;
|
|
use Poniverse\Ponyfm\Http\Controllers\ApiControllerBase;
|
|
use Poniverse\Ponyfm\Models\Report;
|
|
|
|
class ReportController extends ApiControllerBase
|
|
{
|
|
public function getReportCategories($type) {
|
|
$type_id = Report::getResourceTypeIdFromString($type);
|
|
$categories = Report::getCategories($type_id);
|
|
return Response::json(['categories' => $categories]);
|
|
}
|
|
|
|
public function getReports() {
|
|
$reports = Report::all();
|
|
$reports[0]['type_string'] = $reports[0]->resource();
|
|
return $reports;
|
|
}
|
|
}
|