2017-25 © Pedro Peláez
 

library oracle-laravel-vendor

Vendor for oracle at laravel

image

darlane/oracle-laravel-vendor

Vendor for oracle at laravel

  • Thursday, May 24, 2018
  • by darlane
  • Repository
  • 1 Watchers
  • 0 Stars
  • 42 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 1 Versions
  • 740 % Grown

The README.md

oracle-laravel-vendor

Vendor for oracle at laravel, (*1)

Add to app.php at 'providers' block:, (*2)

\OracleLib\Providers\OracleServiceProvider::class

Next:, (*3)

php artisan vendor:publish --provider="\OracleLib\Providers\OracleServiceProvider" --tag="config"

Create trait, like at example:, (*4)

trait OracleRepositoryList
{

}

Next all new repository add at this trait and AppServiceProvider, (*5)

/**
 * @return FooRepository
 */
public function fooRepository()
{
    return app(FooRepository::class);
}

At AppServiceProvider, (*6)

public function boot()
{
    $this->app->singleton(FooRepository::class, function () {
        return new FooRepository(app('oracle'));
    }); 
}

At class, where you wanna use this repo add trait and use it like this:, (*7)

class FooClass
{
   use OracleRepositoryList;

   public function method()
   {
       $this->testRepository()->test()
   }
}

Example call function with cursor:, (*8)

$result = $this->execute(
        [
            'function'    => 'devdb.get_stat',
            'return_type' => 'cursor',
        ],
        [
            'p_id_user' => 1,
        ]);

$stats  = array_keys_rename($result['cursor'], [
    'EXPERIENCE'     => 'experience',
    'STATUS'         => 'status',
    'DT              => 'date',
]);
$stats  = array_keys_set_type($stats, [
    'experience'                => 'integer',
    'status'                    => 'integer',
    'credit_date'               => 'date',
]);

The Versions

24/05 2018

dev-master

9999999-dev

Vendor for oracle at laravel

  Sources   Download

MIT

The Requires

 

by Daniil Krents

laravel php oracle phporacle