lundi 26 mars 2018

Type error: Argument 2 passed to with() must be callable or null, object given

Route::get('/',function (){
    $collection = collect(['product'=>'chair','price'=>100]);    
    //dd($collection);
    return view('welcome')-with('prices',$collection);
});

I want to pass $collection on view but I get this error:

Type error: Argument 2 passed to with() must be callable or null,

object given

and I don't understand why.

Can somebody explain me?



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

Aucun commentaire:

Enregistrer un commentaire