larapi
larapi copied to clipboard
Just some questions
Hello,
i discovered your blog and i love this structure more easier but i have some questions with relationship.
PUT /users/1 => update user information
{
'user': {
'metas': [
{
'name: 'Name 1',
'value': 'Value 1'
},
{
'name: 'Name 2',
'value': 'Value 2'
}
]
}
}
-
How work relationship ? I can't understand where to put method for checking if parameter is in request and create/update data in request.
-
How to load relationship ? In older work i have in my model
protected $with = ['author'];
but this code doesn't work.
Thank you.