In my application I use Oracle DB connection (it is not the only one, since I also have MySQL and MSSQL).
Oracle DB has a thing called DB link (basically you can specify "table_name@database_link") - this used typically in the replication, but it's not the point.
In the standard QueryBuilder, I can do something like
DB::connection('oracle')->table(DB::raw('table_name@dblink')) and it works, but how can I do the same in the Eloquent model?
Doing $table = 'table_name@dblink will produce an error stating that it can't find table or view.
@Tray2 Not really: the new model won't work, unless I specify a new connection specifically for that DB link in laravel-oci8 config.
Since the same table is accessible via both DB links (this is a replicated DB), it won't work. I was asking if it is possible to do the same in model itself, without changing the connection params.
I know it works in simple QueryBuilder like ->table(DB::raw('table_name@dblink'))