Laravel whereRaw with parameters doesn't work?

Viewed 20297

According to the documentation, this should work:

return $query->whereRaw("lang =  '?'",array(App::getLocale()));

But it doesn't while this works:

return $query->whereRaw("lang =  '".App::getLocale()."'");

What am I doing wrong? Here is the documentation

$users = User::whereRaw('age > ? and votes = 100', array(25))->get();
1 Answers
Related