Skip to content

Like query not working on integer fields. #2016

Closed
@ultimateakash

Description

@ultimateakash
  • Laravel-mongodb Version: ^3.5
  • PHP Version: 7.3
  • Database Driver & Version: 3.4 (mongo)

Description:

In my project i need to implement search functionality on different columns. on string column it works fine but it didn't work on integer fields.

Steps to reproduce

Just for example

$code = 256;
        
$branch = Branch::where('code','like',"%".$code."%")->first();
        return response()->json([
            'branch' => $branch
        ]);

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions