f3-boilerplate icon indicating copy to clipboard operation
f3-boilerplate copied to clipboard

Database connection handy including

Open NetLancer opened this issue 5 years ago • 0 comments

Hi there! I've been looking for a convenient method of including $db_connection just whenever needed and i've come up so far with confinement of DNS in predefined class. Then each time i need it do: $f3->call('DBClass::connect'), but still it seems to me somewhat awkward. Now i see in the project's index.php file: // database connection used by app [lines 35-36] $dbConfig = $f3->get('db'); -which seems handy enough, but keep on guessing what it actually referencing so i can make use of.

Pardon my dummy question, but i don't see the other way to post a question of this sort, hope for simple answer :)

NetLancer avatar Sep 18 '19 19:09 NetLancer