larapi icon indicating copy to clipboard operation
larapi copied to clipboard

Just some questions

Open julienmiclo opened this issue 5 years ago • 0 comments

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'
			}
		]
	}
}
  1. How work relationship ? I can't understand where to put method for checking if parameter is in request and create/update data in request.

  2. How to load relationship ? In older work i have in my model protected $with = ['author']; but this code doesn't work.

Thank you.

julienmiclo avatar Jan 07 '19 09:01 julienmiclo