PHPackages                             naldi/laravel-oci8 - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Database &amp; ORM](/categories/database)
4. /
5. naldi/laravel-oci8

ActiveLibrary[Database &amp; ORM](/categories/database)

naldi/laravel-oci8
==================

Oracle DB driver for Laravel 4|5|6|7 via OCI8

8.3.1(5y ago)012MITPHPPHP ^7.3|^8.0

Since Jan 15Pushed 5y agoCompare

[ Source](https://github.com/MatheusNaldi/laravel-oci8)[ Packagist](https://packagist.org/packages/naldi/laravel-oci8)[ Fund](https://www.paypal.me/yajra)[ Patreon](https://www.patreon.com/yajra)[ RSS](/packages/naldi-laravel-oci8/feed)WikiDiscussions 8.x Synced today

READMEChangelog (2)Dependencies (8)Versions (262)Used By (0)

Oracle DB driver for Laravel 4|5|6|7|8 via OCI8
===============================================

[](#oracle-db-driver-for-laravel-45678-via-oci8)

[![Build Status](https://github.com/yajra/laravel-oci8/workflows/tests/badge.svg)](https://github.com/yajra/laravel-oci8/actions)[![Total Downloads](https://camo.githubusercontent.com/15c34a8d821e05fc9e12c5a707412bf6b00c696020bf540929f0e1d4f7e3a42d/68747470733a2f2f706f7365722e707567782e6f72672f79616a72612f6c61726176656c2d6f6369382f642f746f74616c2e737667)](https://packagist.org/packages/yajra/laravel-oci8)[![Latest Stable Version](https://camo.githubusercontent.com/52aa0351cf9a08e178356ae1734f0dfe179b854530fc6490930a13375e800935/68747470733a2f2f706f7365722e707567782e6f72672f79616a72612f6c61726176656c2d6f6369382f762f737461626c652e737667)](https://packagist.org/packages/yajra/laravel-oci8)[![License](https://camo.githubusercontent.com/b0638f84f86a85b8703803f5e66fca5a99f32dd3b02dd3950115b5014a52f111/68747470733a2f2f706f7365722e707567782e6f72672f79616a72612f6c61726176656c2d6f6369382f6c6963656e73652e737667)](https://packagist.org/packages/yajra/laravel-oci8)

Laravel-OCI8
------------

[](#laravel-oci8)

Laravel-OCI8 is an Oracle Database Driver package for [Laravel](http://laravel.com/). Laravel-OCI8 is an extension of [Illuminate/Database](https://github.com/illuminate/database) that uses [OCI8](http://php.net/oci8) extension to communicate with Oracle. Thanks to @taylorotwell.

Documentations
--------------

[](#documentations)

- You will find user friendly and updated documentation here: [Laravel-OCI8 Docs](https://yajrabox.com/docs/laravel-oci8)
- All about oracle and php:[The Underground PHPand Oracle Manual](http://www.oracle.com/technetwork/database/database-technologies/php/201212-ug-php-oracle-1884760.pdf)

Laravel Version Compatibility
-----------------------------

[](#laravel-version-compatibility)

LaravelPackage5.1.x5.1.x5.2.x5.2.x5.3.x5.3.x5.4.x5.4.x5.5.x5.5.x5.6.x5.6.x5.7.x5.7.x5.8.x5.8.x6.x.x6.x.x7.x.x7.x.x8.x.x8.x.xQuick Installation
------------------

[](#quick-installation)

```
composer require yajra/laravel-oci8:^8
```

Service Provider (Optional on Laravel 5.5+)
-------------------------------------------

[](#service-provider-optional-on-laravel-55)

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:

```
Yajra\Oci8\Oci8ServiceProvider::class,
```

Configuration (OPTIONAL)
------------------------

[](#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 configuration.

```
php artisan vendor:publish --tag=oracle
```

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

> Note: For [Laravel Lumen configuration](http://lumen.laravel.com/docs/configuration#configuration-files), 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', ''),
    'edition'       => env('DB_EDITION', 'ora$base'),
],
```

> If you need to connect with the service name instead of tns, you can use the configuration below:

```
'oracle' => [
    'driver' => 'oracle',
    'host' => 'oracle.host',
    'port' => '1521',
    'database' => 'xe',
    'service_name' => 'sid_alias',
    'username' => 'hr',
    'password' => 'hr',
    'charset' => '',
    'prefix' => '',
]

```

And run your laravel installation...

\[Laravel 5.2++\] Oracle User Provider
--------------------------------------

[](#laravel-52-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,
    ],
]
```

Credits
-------

[](#credits)

- [Arjay Angeles](https://github.com/yajra)
- [Jimmy Felder](https://github.com/jfelder/Laravel-OracleDB)
- [All Contributors](../../contributors)

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

###  Health Score

36

—

LowBetter than 82% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity5

Limited adoption so far

Community19

Small or concentrated contributor base

Maturity88

Battle-tested with a long release history

 Bus Factor1

Top contributor holds 89.1% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~10 days

Total

258

Last Release

1937d ago

Major Versions

5.8.x-dev → v6.1.12020-06-18

6.x-dev → v7.0.12020-06-18

v7.0.1 → v8.0.02020-09-09

v7.0.2 → v8.2.22020-12-08

7.x-dev → v8.2.32021-01-06

PHP version history (11 changes)0.1.0PHP &gt;=5.3.0

v2.0.0.betaPHP &gt;=5.4.0

v2.0.0PHP &gt;=5.4

v3.0.0PHP &gt;=5.5.9

v5.3.0PHP &gt;=5.6.4

v5.5.0PHP &gt;=7.0.0

v5.6.0PHP ^7.1.3

v6.0.0PHP ^7.2

v7.0.0PHP ^7.2.5

v8.0.0PHP ^7.3

8.3.0PHP ^7.3|^8.0

### Community

Maintainers

![](https://www.gravatar.com/avatar/ad9b50b455d580d8f1735c86872cbcdb2c16eb09b8a47a5c9dc7a61168902d61?d=identicon)[Matheus Naldi](/maintainers/Matheus%20Naldi)

---

Top Contributors

[![yajra](https://avatars.githubusercontent.com/u/2687997?v=4)](https://github.com/yajra "yajra (767 commits)")[![forgandenny](https://avatars.githubusercontent.com/u/2554234?v=4)](https://github.com/forgandenny "forgandenny (10 commits)")[![mfrancoisbbs](https://avatars.githubusercontent.com/u/133215273?v=4)](https://github.com/mfrancoisbbs "mfrancoisbbs (9 commits)")[![ChaosPower](https://avatars.githubusercontent.com/u/260845?v=4)](https://github.com/ChaosPower "ChaosPower (9 commits)")[![joaorobertopb](https://avatars.githubusercontent.com/u/6556083?v=4)](https://github.com/joaorobertopb "joaorobertopb (9 commits)")[![Adam2Marsh](https://avatars.githubusercontent.com/u/7213334?v=4)](https://github.com/Adam2Marsh "Adam2Marsh (6 commits)")[![jfelder](https://avatars.githubusercontent.com/u/4504343?v=4)](https://github.com/jfelder "jfelder (4 commits)")[![mstaack](https://avatars.githubusercontent.com/u/10169509?v=4)](https://github.com/mstaack "mstaack (4 commits)")[![jaydons](https://avatars.githubusercontent.com/u/44308248?v=4)](https://github.com/jaydons "jaydons (4 commits)")[![rhernandezOB](https://avatars.githubusercontent.com/u/135292745?v=4)](https://github.com/rhernandezOB "rhernandezOB (3 commits)")[![OmarAta](https://avatars.githubusercontent.com/u/9981596?v=4)](https://github.com/OmarAta "OmarAta (3 commits)")[![mozgovoyandrey](https://avatars.githubusercontent.com/u/2863373?v=4)](https://github.com/mozgovoyandrey "mozgovoyandrey (3 commits)")[![zulrang](https://avatars.githubusercontent.com/u/1043189?v=4)](https://github.com/zulrang "zulrang (2 commits)")[![ardani](https://avatars.githubusercontent.com/u/2499777?v=4)](https://github.com/ardani "ardani (2 commits)")[![carusogabriel](https://avatars.githubusercontent.com/u/16328050?v=4)](https://github.com/carusogabriel "carusogabriel (2 commits)")[![filipegar](https://avatars.githubusercontent.com/u/9282579?v=4)](https://github.com/filipegar "filipegar (2 commits)")[![jf-m](https://avatars.githubusercontent.com/u/9339799?v=4)](https://github.com/jf-m "jf-m (2 commits)")[![johnrcui](https://avatars.githubusercontent.com/u/6743129?v=4)](https://github.com/johnrcui "johnrcui (2 commits)")[![MatheusNaldi](https://avatars.githubusercontent.com/u/16821957?v=4)](https://github.com/MatheusNaldi "MatheusNaldi (2 commits)")[![mazedlx](https://avatars.githubusercontent.com/u/9453522?v=4)](https://github.com/mazedlx "mazedlx (2 commits)")

---

Tags

laraveloracleoci8pdo\_oci

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/naldi-laravel-oci8/health.svg)

```
[![Health](https://phpackages.com/badges/naldi-laravel-oci8/health.svg)](https://phpackages.com/packages/naldi-laravel-oci8)
```

###  Alternatives

[yajra/laravel-oci8

Oracle DB driver for Laravel via OCI8

8703.0M17](/packages/yajra-laravel-oci8)[tucker-eric/eloquentfilter

An Eloquent way to filter Eloquent Models

1.8k4.8M26](/packages/tucker-eric-eloquentfilter)[laravel-doctrine/orm

An integration library for Laravel and Doctrine ORM

8425.3M87](/packages/laravel-doctrine-orm)[watson/validating

Eloquent model validating trait.

9723.3M47](/packages/watson-validating)[mehdi-fathi/eloquent-filter

Eloquent Filter adds custom filters automatically to your Eloquent Models in Laravel.It's easy to use and fully dynamic, just with sending the Query Strings to it.

450191.6k1](/packages/mehdi-fathi-eloquent-filter)[clickbar/laravel-magellan

This package provides functionality for working with the postgis extension in Laravel.

423715.4k1](/packages/clickbar-laravel-magellan)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
