i am used laravel 5.1
i try to solved
model
public function scopeLoacatedAt($zip, $street, $query)
{
return $query->where(compact('zip','street'));
$street = str_replace('-',' ', $street);
}
controller function
public function show($zip, $street)
{
$flyer = Flyer::loacatedAt($zip, $street)->first();
return view('flyers.show', compact('flyer'));
}
Error message when i run in browser i deleted compact and use another elquent collection i have same msg Call to a member function where() on string