Relationship Between Diferents databases #2307
lindomar-pjs
started this conversation in
General
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hello.
I'm having trouble loading a relationship between tables that are in different databases.
I have a table that retrieves data from another view using an identification code.
When trying to load it using Eloquent, I can do it normally. But in the tables, the columns with name and email that come from the view are not loaded and generate an error. The datatable tries to overwrite the query, and generates an error:
Base table or view not found: 1146 Table 'gcms-update.view_policiais' doesn't exist... The first is the local database, and the second is the view. I don't know how or why it joins the two when trying to create the columns.
Has anyone experienced something similar?
my datatable
public function builder(): Builder
{
return Signature::query()->with('delta');
}
my model
#column
Column::make('Nome','delta.nome')
TKS!
Beta Was this translation helpful? Give feedback.
All reactions