Package Data | |
---|---|
Maintainer Username: | marcuoli |
Maintainer Contact: | jimmyfelder@gmail.com (Jimmy Felder) |
Package Create Date: | 2014-01-12 |
Package Last Update: | 2014-01-12 |
Language: | PHP |
License: | MIT |
Last Refreshed: | 2024-12-14 15:18:26 |
Package Statistics | |
---|---|
Total Downloads: | 17 |
Monthly Downloads: | 0 |
Daily Downloads: | 0 |
Total Stars: | 1 |
Total Watchers: | 1 |
Total Forks: | 0 |
Total Open Issues: | 0 |
OracleDB is an Oracle Database Driver package for Laravel 4.1. OracleDB is an extension of Illuminate/Database that uses the (Thanks to @taylorotwell)
Please report any bugs you may find.
Add marcuoli/oracledb
as a requirement to composer.json:
{
"require": {
"marcuoli/oracledb": "*"
}
}
And then run composer update
Once Composer has installed or updated your packages you need to register OracleDB. Open up app/config/app.php
and find the providers
key and add:
'Jfelder\OracleDB\OracleDBServiceProvider'
Finally you need to publish a configuration file by running the following Artisan command.
$ php artisan config:publish marcuoli/oracledb
This will copy the configuration file to app/config/packages/jfelder/oracledb/database.php
The configuration file for this package is located at 'app/config/packages/jfelder/oracledb/database.php'. In this file you may define all of your oracle database connections. If you want to make one of these connections the default connection, enter the name you gave the connection into the "Default Database Connection Name" section in 'app/config/database.php'.
Once you have configured the OracleDB database connection(s), you may run queries using the 'DB' class as normal.
$results = DB::select('select * from users where id = ?', array(1));
The above statement assumes you have set the default connection to be the oracle connection you setup in OracleDB's config file and will always return an 'array' of results.
$results = DB::connection('oracle')->select('select * from users where id = ?', array(1));
Just like the built-in database drivers, you can use the connection method to access the oracle database(s) you setup in OracleDB's config file.
See Laravel 4 Database Basic Docs for more information.
You can use the Query Builder functionality exactly the same as you would with the default DB class in Laravel 4. Every query on Laravel 4 Database Query Builder Docs has been tested to ensure that it works.
Offset & Limit
$users = DB::table('users')->skip(10)->take(5)->get();
See Laravel 4 Database Query Builder Docs for more information.
See Laravel 4 Eloquent Docs for more information.
See Laravel 4 Schema Docs for more information.
See Laravel 4 Migrations Docs for more information.
Licensed under the MIT License.