xxxxxxxxxx
// when you need to filter like relationships from another database connection
// you will need to set that table is under what database connection
protected $connection = 'mysql2';
protected $table = 'transactions';
public function __construct()
{
$this->table = DB::connection($this->connection)->getDatabaseName() . '.' . $this->getTable();
}