24 lines
427 B
PHP
24 lines
427 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($userId = null)
|
|
{
|
|
if (is_null($userId)) {
|
|
$userId = User::getInstance()->getId();
|
|
}
|
|
return Db::getInstance()->execute('SELECT sender_id, image FROM `users_presents` WHERE owner_id = ?', $userId);
|
|
}
|
|
}
|