Laravel connect oracle

laravel608發表於2019-08-06

環境配置:
PHP >= 5.6.4
OCI8 PHP Extension

安裝laravel OCI8

composer require yajra/laravel-oci8

備註:You can use Laravel OCI8 with Laravel as well as Lumen.

with laravel:
Open the file config/app.php and then add following service provider.

'providers' => [
    // ...
    Yajra\Oci8\Oci8ServiceProvider::class,
],
php artisan vendor:publish --tag=oracle

with Lumen:
Open the file bootstrap/app.php and then add following service provider. This step is required.

$app->register(Yajra\Oci8\Oci8ServiceProvider::class);

You should also uncomment the $app->withFacades() and $app->withEloquent() call in your bootstrap/app.php file.

// ...

$app->withFacades();

$app->withEloquent();

// ...

相關文章