aboutsummaryrefslogtreecommitdiff
path: root/bootstrap/database/Connection.php
blob: deec2c6794b0a6e1d47ba93c4229289fbf900e66 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
<?php

class Connection
{
    public static function make($config)
    {
        try {
            return new PDO(
                $config['connection'].';dbname='.$config['name'],
                $config['username'],
                $config['password'],
                $config['options']
            );
        } catch (PDOException $e) {
            error_log($e->getMessage());
        }
    }
}