Fixes for client documents query
This commit is contained in:
parent
eb574f3444
commit
8de86a2abd
|
|
@ -122,7 +122,7 @@ class DocumentsTable extends Component
|
||||||
|
|
||||||
return $client->documents()
|
return $client->documents()
|
||||||
->where('is_public', true)
|
->where('is_public', true)
|
||||||
->orWhere(function ($query){
|
->orWhere(function ($query) use ($client) {
|
||||||
|
|
||||||
$query->whereHasMorph('documentable', [Company::class], function ($q) use ($client) {
|
$query->whereHasMorph('documentable', [Company::class], function ($q) use ($client) {
|
||||||
$q->where('is_public', true)->where('company_id', $client->company_id);
|
$q->where('is_public', true)->where('company_id', $client->company_id);
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue