how filter in model file

Posted 7 months ago by haizone

hi i have a model is name "city"

and i have that function:

 public function branches()
         return $this->hasMany('App\Models\Branch')

i have table business has many branches.

now i whant only where in == 1 to filter that and get only where in business table in rest ==1

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

Reply to

Use Markdown with GitHub-flavored code blocks.