Torann / laravel-currency

This provides Laravel with currency functions such as currency formatting and conversion using up-to-date exchange rates.
http://lyften.com/projects/laravel-currency
BSD 2-Clause "Simplified" License
395 stars 136 forks source link

drivers database connection optional #149

Open yespbs opened 3 years ago

yespbs commented 3 years ago

Please make drivers.database.connection optional in Torann\Currency\Drivers\Database.php so default connection can be loaded always.

if( $this->config('connection') ){
     $this->database = app('db')->connection($this->config('connection'));
}else{
     $this->database = app('db');
}

This will allow the package to be used in multi tenancy i.e. stancl/tenancy

jefferose commented 1 year ago

I'm facing this challenge now - have you solved this at all?