battles/classes/Battles/Models/Presents.php
lopar b9b4c01cf0 Зимние правки. MVC/
Signed-off-by: lopar <lopar.4ever@gmail.com>
2022-08-09 22:57:43 +03:00

22 lines
429 B
PHP

<?php
/**
* Author: lopiu
* Date: 04.07.2020
* Time: 13:17
*/
namespace Battles\Models;
use Battles\Database\Db;
use Battles\User;
class Presents
{
public function getAll($user_id = null)
{
if (is_null($user_id)) {
$user_id = User::getInstance()->getId();
}
return Db::getInstance()->execute('SELECT sender_id, image FROM `users_presents` WHERE owner_id = ?', $user_id);
}
}