The following script returns an 'undefined variable (plaatsholder) error' on the whereSlug($plaatshouder) part. Without result I've tried defining it as a global variable and by passing it as function($plaatshouder). Any clue?
public function index($plaatshouder)
{
$collectie = Cache::tags('plaats')->remember($plaatshouder, 40320, function()
{
return Plaats::select(['plaats', 'id', 'wikplaats'])->whereSlug($plaatshouder)->first();
});
}