标签: mysql database laravel
我想通过将“ gos.id”与“ service_gos.gos_id”(LARAVEL 5.6)进行比较,仅返回未在“ service_gos”表中注册的那些“ gos”
goals table
service_goals table
my view
my controller function
result expected
this is what im getting
答案 0 :(得分:0)
不确定表名,请相应更改。 试试:
$ids = Goals::whereDoesntHave("service_goals")->pluck("id");