marcuoli / oracledb
Oracle DB driver for Laravel 4+
Requires
- php: >=5.3.0
- illuminate/database: 4.*
- illuminate/support: 4.*
Requires (Dev)
- mockery/mockery: 0.7.2
- phpunit/phpunit: 3.7.*
This package is not auto-updated.
Last update: 2024-11-05 06:00:42 UTC
README
OracleDB
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.
Installation
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
Basic Usage
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.
Query Builder
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.
Eloquent
See Laravel 4 Eloquent Docs for more information.
Schema (WIP)
See Laravel 4 Schema Docs for more information.
Migrations (WIP)
See Laravel 4 Migrations Docs for more information.
License
Licensed under the MIT License.