Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
syncEnrollments
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Yeray Santana Hualde
syncEnrollments
Commits
5387312e
Commit
5387312e
authored
Sep 18, 2011
by
Taylor Otwell
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
changed database config.
parent
32391b7f
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
39 additions
and
48 deletions
+39
-48
database.php
application/config/database.php
+39
-48
No files found.
application/config/database.php
View file @
5387312e
...
@@ -10,9 +10,7 @@ return array(
...
@@ -10,9 +10,7 @@ return array(
| The name of your default database connection.
| The name of your default database connection.
|
|
| This connection will be the default for all database operations unless a
| This connection will be the default for all database operations unless a
| different connection is specified when performing the operation. The name
| different connection is specified when performing the operation.
| of the default connection should correspond to the name of a connector
| defined below.
|
|
*/
*/
...
@@ -20,63 +18,56 @@ return array(
...
@@ -20,63 +18,56 @@ return array(
/*
/*
|--------------------------------------------------------------------------
|--------------------------------------------------------------------------
| Database Connect
or
s
| Database Connect
ion
s
|--------------------------------------------------------------------------
|--------------------------------------------------------------------------
|
|
| All of the database connect
or
s used by your application.
| All of the database connect
ion
s used by your application.
|
|
| Each connector should return a PDO connection. You may connect to any
| Supported Drivers: 'mysql', 'pgsql', 'sqlite'.
| database system you wish. Of course, default configurations for the
| systems supported by Laravel are provided for you.
|
|
|
The entire database configuration array is passed to the connector
|
Note: When using the SQLite driver, the path and "sqlite" extention will
|
closure, so you may convenient use it when connecting to your databas
e.
|
be added automatically. You only need to specify the database nam
e.
|
|
| Note: When using an unsupported database, Eloquent and the fluent query
| Using a driver that isn't supported? You can still establish a PDO
| builder may not work as expected. Currently, MySQL, Postgres, and
| connection. Simply specify a driver and DSN option:
| SQLite are fully supported by Laravel.
|
| 'odbc' => array(
| 'driver' => 'odbc',
| 'dsn' => 'your-dsn',
| 'username' => 'username',
| 'password' => 'password',
| )
|
| Note: When using an unsupported driver, Eloquent and the fluent query
| builder may not work as expected.
|
|
*/
*/
'connectors'
=>
array
(
'connections'
=>
array
(
'sqlite'
=>
function
(
$config
)
{
return
new
PDO
(
'sqlite:'
.
DATABASE_PATH
.
'application.sqlite'
,
null
,
null
,
$config
[
'options'
]);
},
'
mysql'
=>
function
(
$config
)
'
sqlite'
=>
array
(
{
'driver'
=>
'sqlite'
,
return
new
PDO
(
'mysql:host=localhost;dbname=database'
,
'root'
,
'password'
,
$config
[
'options'
]);
'database'
=>
'application'
,
}
,
)
,
'pgsql'
=>
function
(
$config
)
'mysql'
=>
array
(
{
'driver'
=>
'mysql'
,
return
new
PDO
(
'pgsql:host=localhost;dbname=database'
,
'root'
,
'password'
,
$config
[
'options'
]);
'host'
=>
'localhost'
,
},
'database'
=>
'database'
,
'username'
=>
'root'
,
'password'
=>
'password'
,
'charset'
=>
'utf8'
,
),
),
'pgsql'
=>
array
(
'driver'
=>
'pgsql'
,
/*
'host'
=>
'localhost'
,
|--------------------------------------------------------------------------
'database'
=>
'database'
,
| Database PDO Options
'username'
=>
'root'
,
|--------------------------------------------------------------------------
'password'
=>
'password'
,
|
'charset'
=>
'utf8'
,
| Here you may specify the PDO options that should be used when connecting
),
| to a database. The entire database configuration array is passed to the
| database connector closures, so may convenient access these options from
| your connectors.
|
| For a list of options, visit: http://php.net/manual/en/pdo.setattribute.php
|
*/
'options'
=>
array
(
PDO
::
ATTR_CASE
=>
PDO
::
CASE_LOWER
,
PDO
::
ATTR_ERRMODE
=>
PDO
::
ERRMODE_EXCEPTION
,
PDO
::
ATTR_ORACLE_NULLS
=>
PDO
::
NULL_NATURAL
,
PDO
::
ATTR_STRINGIFY_FETCHES
=>
false
,
PDO
::
ATTR_EMULATE_PREPARES
=>
false
,
),
),
);
);
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment