where condition case insensitive on eager loading

Posted 5 months ago by Nagraj722

How to write a query for case insensitive on relationship

  $products = Product::where('category_id',$category->id)->where('active_flag',1)->distinct()->get(['company_id']);


      $data =  $products->load('company')->where('company.country','like', '%'.$country . '%');

Please sign in or create an account to participate in this conversation.

Reply to

Use Markdown with GitHub-flavored code blocks.