@@ -94,8 +94,11 @@ was pretty tough. So i decided to create a much more easier way of communicating
9494 * [ Drop Migration] ( #drop-migration )
9595 * [ Drop Table] ( #drop-table )
9696 * [ Drop Column] ( #drop-column )
97- * [ Get Database Config Data ] ( #get-database-config-data )
97+ * [ Get Database Config] ( #get-database-config )
9898* [ Get Database Connection] ( #get-database-connection )
99+ * [ Get Database Name] ( #get-database-name )
100+ * [ Get Database PDO] ( #get-database-pdo )
101+ * [ Get Database TablePrefix] ( #get-database-tableprefix )
99102* [ Database Import] ( #database-import )
100103* [ Update Env Variable] ( #update-env-variable )
101104* [ Env Servers] ( #Env-servers )
@@ -119,7 +122,7 @@ Prior to installing `php-orm-database` get the [Composer](https://getcomposer.or
119122** Step 1** — update your ` composer.json ` :
120123``` composer.json
121124"require" : {
122- "peterson/database" : " ^4.3.5 "
125+ "peterson/database" : " ^4.3.6 "
123126}
124127```
125128
@@ -140,28 +143,26 @@ composer require peterson/database
140143require_once __DIR__ . '/vendor/autoload.php';
141144```
142145
143- ** Step 2** — ` Run once in browser `
146+ ** Step 2** — ` Call the below methid() and Run once in browser`
144147- This will auto setup your entire application on a ` go! `
145148
146149| Description |
147150| -----------------------------------------------------------------------------------------------|
148- | It's important to install vendor in your project root. We use this to get your root [ dir] |
151+ | It's important to install vendor in your project root, As we use this to get your root [ dir] |
149152| By default you don't need to define any path again |
150- | Files you'll see ` .env ` ` .gitignore ` ` .htaccess ` ` .user.ini ` ` init.php ` |
153+ | |
154+ | Files you'll see after you reload browser: |
155+ | ` .env ` ` .gitignore ` ` .htaccess ` ` .user.ini ` ` init.php ` |
151156
152157```
153158use builder\Database\AutoLoader;
154159
155- AutoLoader::start([
156- 'path' => 'define root path or ignore'
157- ]);
160+ AutoLoader::start();
158161```
159162
160163- or -- ` Helpers Function `
161164```
162- autoloader_start([
163- 'path' => 'define root path or ignore'
164- ]);
165+ autoloader_start('optional_path_to_root');
165166```
166167
167168## Init.php File
@@ -1118,17 +1119,35 @@ schema()->dropColumn('table_name', 'column_name');
11181119```
11191120</details >
11201121
1121- ## Get Database Config Data
1122+ ## Get Database Config
1123+ ```
1124+ $db->getConfig()
1125+ ```
1126+
1127+ ## Get Database Connection
1128+ ```
1129+ $db->dbConnection()
1130+ ```
1131+
1132+ - or -- ` Helpers Function `
1133+ ```
1134+ db_connection();
1135+ ```
11221136
1123- | object | Helpers |
1124- | -------------------| ---------------|
1125- | $db->env() | env() |
1137+ ## Get Database Name
1138+ ```
1139+ $db->getDatabaseName()
1140+ ```
11261141
1142+ ## Get Database PDO
1143+ ```
1144+ $db->getPDO()
1145+ ```
11271146
1128- ## Get Database Connection
1129- | object | Helpers |
1130- | ----------------------- | ------------------- |
1131- | $db->dbConnection() | db_connection() |
1147+ ## Get Database TablePrefix
1148+ ```
1149+ $db->getTablePrefix()
1150+ ```
11321151
11331152## Database Import
11341153- You can use this class to import .sql into a database programatically
@@ -1153,6 +1172,7 @@ $status = $database->import('path_to/orm.sql');
11531172import('path_to/orm.sql');
11541173```
11551174
1175+
11561176## Update Env Variable
11571177- You can use this class to import .sql into a database programatically
11581178
0 commit comments