Skip to content

Soft-delete with orWhere doesn't return results #43

Closed
@rms2219

Description

@rms2219

The following query yields many results:

$query = '%'.Input::get('q').'%';
return Contract::where('contractNumber', 'like', $query)->get();

But this query returns ZERO results...if anything, shouldn't it only return more results?

$query = '%'.Input::get('q').'%';
return Contract::where('contractNumber', 'like', $query)->orWhere('customerId', 'like', $query)->get();

"Contract" has $softDelete = 'true', and as soon as I turned that off, my orWhere clauses worked again

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions