Last active
February 29, 2020 21:02
-
-
Save claretnnamocha/64df3593964f2076ef3139fb0c2bcc9a to your computer and use it in GitHub Desktop.
php-alpha-orm connection snippet
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
use ALphaORM\ALphaORM as DB; | |
# Setting up COnnection to database | |
#MySQL | |
DB::setup('mysql',[ | |
'host' => 'localhost', | |
'user' => 'root', | |
'password' => '', | |
'database' => 'alphaorm' | |
]); | |
#PostgreSQL | |
DB::setup('pgsql',[ | |
'host' => 'localhost', | |
'user' => 'postgres', | |
'password' => 'postgres', | |
'database' => 'alphaorm', | |
'schema' => 'public' // Optional | |
]); | |
#SQLite | |
DB::setup('sqlite',[ | |
'database' => 'alphaorm' | |
]); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment