create table car_makes
(
id bigint unsigned auto_increment primary key,
created_at timestamp null,
updated_at timestamp null,
make varchar(255) default '' not null,
make_ar varchar(255) default '' not null,
make_en varchar(255) default '' not null,
logo_url varchar(255) default '' not null,
description_ar varchar(255) default '' not null,
description_en varchar(255) default '' not null
)
create table car_models
(
id bigint unsigned auto_increment primary key,
created_at timestamp null,
updated_at timestamp null,
model varchar(255) not null,
model_en varchar(255) default '' not null,
model_ar varchar(255) default '' not null,
make_id bigint unsigned not null,
constraint car_models_make_id_foreign
foreign key (make_id) references car_makes (id)
)
Now, I created two BREADs in the admin panel, when I try to search models by make and I get an error.
I checked the query to see why this is happening and I get a very strange query
Well there is no column called car_model_belongsto_car_make_relashionship
Steps to reproduce
Create two BREADs
Create a belongs relationship between these two BREADs
Search the child relationship by its parent relationship.
Expected behavior
It should join by the foreign key column and search the particular column that is in the relationship.
Laravel version
8.83.27
PHP version
7.3|^8.0
Voyager version
^1.6
Database
MySQL 8
Description
I have two entities CarMake and CarModel
CarModel belongs to CarMake join table
Now, I created two BREADs in the admin panel, when I try to search models by make and I get an error. I checked the query to see why this is happening and I get a very strange query
Well there is no column
called car_model_belongsto_car_make_relashionship
Steps to reproduce
Expected behavior
It should join by the foreign key column and search the particular column that is in the relationship.
Screenshots
Additional context
No response