Coder Social home page Coder Social logo

keithbrinks / laravel-oci8 Goto Github PK

View Code? Open in Web Editor NEW

This project forked from yajra/laravel-oci8

0.0 1.0 0.0 1.5 MB

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

Home Page: https://yajrabox.com/docs/laravel-oci8

License: MIT License

PHP 99.53% Shell 0.47%

laravel-oci8's Introduction

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

Build Status Total Downloads Latest Stable Version License

Laravel-OCI8

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.

Documentations

Laravel Version Compatibility

Laravel Package
5.1.x 5.1.x
5.2.x 5.2.x
5.3.x 5.3.x
5.4.x 5.4.x
5.5.x 5.5.x
5.6.x 5.6.x
5.7.x 5.7.x
5.8.x 5.8.x
6.x.x 6.x.x
7.x.x 7.x.x
8.x.x 8.x.x

Quick Installation

composer require yajra/laravel-oci8:^8

Service Provider (Optional on Laravel 5.5+)

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)

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, 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

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

License

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

laravel-oci8's People

Contributors

yajra avatar mstaack avatar forgandenny avatar mfrancoisbbs avatar chaospower avatar joaorobertopb avatar adam2marsh avatar jaydons avatar jfelder avatar mozgovoyandrey avatar omarata avatar rhernandezob avatar ardani avatar mazedlx avatar filipegar avatar franpregernik avatar carusogabriel avatar tylerian avatar jf-m avatar johnrcui avatar renanwilliam avatar zulrang avatar tumainimosha avatar peyobr avatar elton182 avatar fabiothomaz avatar fabiosmeriglio avatar felippeduarte avatar manuzcom avatar bluedasher13 avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.