<?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();
    }
}
