*/ class OverviewController extends Controller { /** * Renders the base overview page. * @return string */ public function index(): string { return view('manage/overview/index'); } /** * Gets the data for the overview page. * @return string */ public function data(): string { $data = new \stdClass; $data->postsCount = DB::table('posts') ->count(); $data->topicsCount = DB::table('topics') ->count(); $data->usersCount = DB::table('users') ->count(); $data->commentsCount = DB::table('comments') ->count(); $data->uploadsCount = DB::table('uploads') ->count(); return $this->json($data); } }