| @@ 42-49 (lines=8) @@ | ||
| 39 | * |
|
| 40 | * @return mixed |
|
| 41 | */ |
|
| 42 | public function respondCreated($data, $id) |
|
| 43 | { |
|
| 44 | $headers = [ |
|
| 45 | 'Location' => route('devices.show', $id), |
|
| 46 | ]; |
|
| 47 | ||
| 48 | return $this->setStatusCode(201)->respond(compact('data'), $headers); |
|
| 49 | } |
|
| 50 | ||
| 51 | /** |
|
| 52 | * @param array $data |
|
| @@ 56-63 (lines=8) @@ | ||
| 53 | * |
|
| 54 | * @return mixed |
|
| 55 | */ |
|
| 56 | public function respondPoked($data, $id) |
|
| 57 | { |
|
| 58 | $headers = [ |
|
| 59 | 'Location' => route('devices.show', $id), |
|
| 60 | ]; |
|
| 61 | ||
| 62 | return $this->setStatusCode(200)->respond(compact('data'), $headers); |
|
| 63 | } |
|
| 64 | ||
| 65 | /** |
|
| 66 | * @return mixed |
|