laravel-oci8 0,0 editorconfig scrutinizer travis-ci Packagist phpunit

Oracle DB driver for Laravel 4|5 via OCI8

Oracle DB driver for Laravel 4|5 via OCI8


Latest Version on Packagist Software License Build Status Coverage Status Quality Score Total Downloads

Laravel-OCI8 is an Oracle Database Driver package for Laravel. Laravel-OCI8 is an extension of Illuminate/Database that uses OCI8 extension to communicate with Oracle. Thanks to @taylorotwell.


Quick Installation [Laravel 5.3]

$ composer require yajra/laravel-oci8:"5.3.*"

Quick Installation [Laravel 5.2]

$ composer require yajra/laravel-oci8:"5.2.*"

Quick Installation [Laravel 5.1]

$ composer require yajra/laravel-oci8:"5.1.*"

Laravel 4.2 & 5.0 Users

Please use 2.4 branch.

Service Provider

Once Composer has installed or updated your packages you need to register Laravel-OCI8. Open up config/app.php and find the providers key and add:


Important: Since v4.0, the package will now use Yajra\Oci8 (capital Y) namespace from yajra\Oci8 to follow the name standard for vendor name.

Configuration (OPTIONAL)

Finally you can optionally publish a configuration file by running the following Artisan command. If config file is not publish, the package will automatically use what is declared on your .env file database configuartion.

$ php artisan vendor:publish --tag=oracle

This will copy the configuration file to config/oracle.php.

Note: For Laravel Lumen configuration, make sure you have a config/database.php file on your project and append the configuration below:

'oracle' => [
    'driver'        => 'oracle',
    'tns'           => env('DB_TNS', ''),
    'host'          => env('DB_HOST', ''),
    'port'          => env('DB_PORT', '1521'),
    'database'      => env('DB_DATABASE', ''),
    'username'      => env('DB_USERNAME', ''),
    'password'      => env('DB_PASSWORD', ''),
    'charset'       => env('DB_CHARSET', 'AL32UTF8'),
    'prefix'        => env('DB_PREFIX', ''),
    'prefix_schema' => env('DB_SCHEMA_PREFIX', ''),

And run your laravel installation…

[Laravel 5.2++] Oracle User Provider

When using oracle, we may encounter a problem on authentication because oracle queries are case sensitive by default. By using this oracle user provider, we will now be able to avoid user issues when logging in and doing a forgot password failure because of case sensitive search.

To use, just update auth.php config and set the driver to oracle

'providers' => [
	'users' => [
		'driver' => 'oracle',
		'model' => App\User::class,



The MIT License (MIT). Please see License File for more information.

Buy me a beer

Click here to lend your support to: Laravel-OCI8 and make a donation at !

Related Repositories



Oracle DB driver for Laravel 4|5 via OCI8 ...



Oracle DB driver for Laravel 4 ...

Top Contributors

yajra forgandenny mstaack rafael-renan-pacheco ChaosPower jfelder FranPregernik azrael-sub7 zulrang jf-m johnrcui jubairsaidi Tylerian fabiothomaz felippeduarte pawel-damasiewicz liberostelios


package version
dev mockery/mockery ~0.9.4
scrutinizer/ocular ~1.1
phpunit/phpunit ~5.4
php >=5.6.4
ext-oci8 >=2.0.0
illuminate/support 5.4.*
illuminate/database 5.4.*
yajra/laravel-pdo-via-oci8 ^1.3.1


-   v5.3.5 zip tar
-   v5.3.4 zip tar
-   v5.3.3 zip tar
-   v5.3.2 zip tar
-   v5.3.1 zip tar
-   v5.3.0 zip tar
-   v5.2.13 zip tar
-   v5.2.12 zip tar
-   v5.2.11 zip tar
-   v5.2.10 zip tar
-   v5.2.9 zip tar
-   v5.2.8 zip tar
-   v5.2.7 zip tar
-   v5.2.6 zip tar
-   v5.2.5 zip tar
-   v5.2.4 zip tar
-   v5.2.3 zip tar
-   v5.2.2 zip tar
-   v5.2.1 zip tar
-   v5.2.0 zip tar
-   v5.1.3 zip tar
-   v5.1.2 zip tar
-   v5.1.1 zip tar
-   v5.1.0 zip tar
-   v4.2.6 zip tar
-   v4.2.5 zip tar
-   v4.2.4 zip tar
-   v4.2.3 zip tar
-   v4.2.2 zip tar
-   v4.2.1 zip tar