<?php

namespace App\Models;

use \PDO;

class DB
{
    private $host = 'localhost';
    private $user = 'lraqaaxg_sipa';
    private $pass = 'jL;(~eD5$$-T';
    private $dbname = 'lraqaaxg_sipa';

    public function connect()
    {
        $conn_str = "mysql:host=$this->host;dbname=$this->dbname";
        $conn = new PDO($conn_str, $this->user, $this->pass);
        $conn->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);

        return $conn;
    }

    public function dir(){
        return __DIR__ . "/../public/uploads/";;
    }
}
