I've got a simple enough array of user information I'm trying to print.
I can send the information to the view fine. And a command like:
will give me the name.
However when I do a foreach loop to print all the data in the array I get a bunch of numbers. 1 1 1 and blank spaces.
@foreach ($who as $val)
@endforeach
What's going on?
Also, as the array has the titles of each value: ie "Name": "John Doe", is there a way to print the titles separately?
This is the controller:
public function show(UserEdit $object) {
return view('UserEdit', compact('object'));
}
Note the controller is loading the model UserEdit, which has the user's data, and the id is generated from the route. Which I've confirmed works.
via Chebli Mohamed
Aucun commentaire:
Enregistrer un commentaire