correcao integracao site
This commit is contained in:
@@ -26,4 +26,11 @@ class Order extends Model
|
||||
$stmt->execute();
|
||||
return $stmt->fetch()['total'];
|
||||
}
|
||||
|
||||
public function getLastOrderDate()
|
||||
{
|
||||
$stmt = $this->conn->query("SELECT created_at FROM orders ORDER BY id DESC LIMIT 1");
|
||||
$result = $stmt->fetch();
|
||||
return $result ? $result['created_at'] : null;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user