DNSBlock
This commit is contained in:
15
app/Models/Order.php
Normal file
15
app/Models/Order.php
Normal file
@@ -0,0 +1,15 @@
|
||||
<?php
|
||||
namespace App\Models;
|
||||
use App\Core\Model;
|
||||
class Order extends Model
|
||||
{
|
||||
protected $table = 'orders';
|
||||
|
||||
public function recent($limit = 5)
|
||||
{
|
||||
$stmt = $this->conn->prepare("SELECT * FROM orders ORDER BY id DESC LIMIT :limit");
|
||||
$stmt->bindValue(':limit', $limit, \PDO::PARAM_INT);
|
||||
$stmt->execute();
|
||||
return $stmt->fetchAll();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user