mercredi 11 avril 2018

Laravel - Undefined variable: articles

public function press (Request $request)
{
    if($request->has('search')){
        $articles =  Press::search($request->input('search'))->get();
    }
    return view('pages.press.index', compact('articles'));
}

I'm receiving an error Undefined variable: articles. Above is the code I'm using in my controller. What is the error that I'm making?



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire