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'));
}


via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire