esbenp / esbenp/larapi

Just some questions

Open
#46 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
PHP
Stars
399
Forks
114
PR merge metrics
No merged PRs in 30d

Description

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.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.