#is it possible to pass data from the db via routes and blade? no controller
13 messages · Page 1 of 1 (latest)
as the error mentioned, it is an array, not object
probably you should access the value by $data['testament'] instead
but the thing is, the data is an empty array, so I don't think you will able to access the value as well
I see, well thank you for your input. On another page I've got this table actually populates already with data. I was trying to create a new page to see if I could essentially create the table myself and populate the data from the db.
I was glancing over the documentation link you you sent, and perhaps there is a way to pass the data in a different way
Blade's @include directive allows you to include a Blade view from within another view. All variables that are available to the parent view will be made available to the included view:
and perhaps there is a way to pass the data in a different way
If you are saying,
- Click a link
- redirect to new page
- populate the data
Yes that would be nice, also sent you a private message with a snapshot.
https://www.tutorialspoint.com/laravel/laravel_ajax.htm
https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API/Using_Fetch
Probably like
- Click the button to trigger the HTTP request
- Format the data that return from the HTTP request
- Replace the data