What could go wrong if I always pass all variables to the view like this?
public function index(){
$var1= '1';
$var2= '2';
$var3= '3';
$var4= '4';
$var5= '5';
$var6= '6';
return view('index',compact(array_keys(get_defined_vars())));
}
via Chebli Mohamed
Aucun commentaire:
Enregistrer un commentaire