HEllo people,
After a lot of research, I decided to ask you for help.
I am developing a calendar using “dhtmlx scheduler” in the laravel framework.
I am trying to list all fields from the Events table that is related to the Users table.
In ControllerEvent have:
$events = Event::all();
return response()->json([
"data" => $events->all()
]);
The array data is keeping everything right, but when it comes time to show I can’t display what I want.
{ name:“Cliente”, height:50, type:“textarea”, map_to:“user_id”, focus:true }
If you let it, it will show me the user id. But I wanted to show the name of this user. It must be something like (map_to:“user_id.name”) ou (map_to:“user_id[1]”)?
If someone can give me a little help thank you