public function GetStock()
{
$whatstock=stock::all() ;
$max=stock::max('idStock') ;
return view('welcome')->with('zzz',$max)
->with('any',$whatstock) ;
i get it thankyou for answering :).
答案 0 :(得分:1)
You can't return view twice, so change it it:
return view('welcome', ['zzz' => $max, 'any' => $whatstock]);
Or:
return view('welcome')->with('zzz', $max)->with('any', $whatstock);