jeudi 5 mars 2020

variables not passing to view in laravel from controller

Variables not passing to views in laravel project from the controller. getting Undefined variable: title error.

function index()
{

    $data = array(
        'title'=>'Font Awesome & Material Design Icons',
        'description'=>'Create your project with Font Awesome & Material Design Icons',
        'seo_keywords'=>'Create your project with Font Awesome & Material Design Icons',
        'data'=> DB::table('fontawesomeicons')->orderBy('id', 'asc')->paginate(50),
        );   

// $data = DB::table('fontawesomeicons')->orderBy('id', 'asc')->paginate(50);
 return view('pagination', compact('data'));

}


from Newest questions tagged laravel-5 - Stack Overflow https://ift.tt/32Qmny1
via IFTTT

Aucun commentaire:

Enregistrer un commentaire