Im getting this Error:
(3/3) QueryException
SQLSTATE[23000]: Integrity constraint violation: 1052 Column 'value' in where clause is ambiguous (SQL: select * from `users` where exists (select * from `permission_templates` inner join `permissions` on `permission_templates`.`value` = `permissions`.`value` where `users`.`id` = `permissions`.`user_id` and (`value` = TICKET_LIST or `value` = MASTER) and `permission_templates`.`deleted_at` is null) and `id` != 3 and `users`.`deleted_at` is null)
If I run this
$collaborators = User::whereHas('permissions', function($query) {
$query->where('value', 'TICKET_LIST')
->orWhere('value', 'MASTER');
})->where('id', '!=', Auth::id())
->get();
via Chebli Mohamed
Aucun commentaire:
Enregistrer un commentaire