mardi 2 août 2016

for each loop in controller adding data to object

This is loop inside my controller:

 foreach(Classes::all() as $classes){
        $classes->student;
    }
    return view('configuration.configuration')->with('classes', $classes);

My question is how to make an object that will fill itself in each passing, so that I can pass that object to view.



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire