Closed pdrolima closed 2 years ago
Hey @webmasterdro,
This seems a bit out of scope for this project, as you can manually override the connection by extending the base models used in this project.
<?php
namespace App\Models;
use FrittenKeeZ\Vouchers\Models\Voucher as BaseVoucher;
class Voucher extends BaseVoucher
{
/**
* The connection name for the model.
*
* @var string|null
*/
protected $connection = 'other_connection';
}
But thank you for your suggestion!
Hello!
This PR add the possibility to set a custom database connection in config. This is very useful when you want to store the data in another database or to "force" relationships between two different databases connections (which is my case).
It's a pretty simple addition, but very useful.