mirror of
https://github.com/slawkens/myaac.git
synced 2025-05-24 22:44:30 +02:00
21 lines
378 B
PHP
21 lines
378 B
PHP
<?php
|
|
|
|
use MyAAC\Models\Account;
|
|
|
|
defined('MYAAC') or die('Direct access not allowed!');
|
|
|
|
$coins = 0;
|
|
|
|
if ($db->hasColumn('accounts', 'coins')) {
|
|
$whatToGet = ['id', 'coins'];
|
|
if (USE_ACCOUNT_NAME) {
|
|
$whatToGet[] = 'name';
|
|
}
|
|
|
|
$coins = Account::orderByDesc('coins')->limit(10)->get($whatToGet)->toArray();
|
|
}
|
|
|
|
$twig->display('coins.html.twig', array(
|
|
'coins' => $coins
|
|
));
|