|
@@ 77-84 (lines=8) @@
|
| 74 |
|
* @param integer $id |
| 75 |
|
* @return \Illuminate\Http\Response |
| 76 |
|
*/ |
| 77 |
|
public function getFind($id) |
| 78 |
|
{ |
| 79 |
|
if ($this->model) |
| 80 |
|
{ |
| 81 |
|
$relations = $this->relations && $this->relations['find'] ? $this->relations['find'] : []; |
| 82 |
|
return \Response::json(call_user_func_array("\Core::{$this->model}", [])->find($id, $relations), 200); |
| 83 |
|
} |
| 84 |
|
} |
| 85 |
|
|
| 86 |
|
/** |
| 87 |
|
* Paginate all records with relations from model repository |
|
@@ 130-137 (lines=8) @@
|
| 127 |
|
* @param \Illuminate\Http\Request $request |
| 128 |
|
* @return \Illuminate\Http\Response |
| 129 |
|
*/ |
| 130 |
|
public function postFirst(Request $request) |
| 131 |
|
{ |
| 132 |
|
if ($this->model) |
| 133 |
|
{ |
| 134 |
|
$relations = $this->relations && $this->relations['first'] ? $this->relations['first'] : []; |
| 135 |
|
return \Response::json(call_user_func_array("\Core::{$this->model}", [])->first($request->all(), $relations), 200); |
| 136 |
|
} |
| 137 |
|
} |
| 138 |
|
|
| 139 |
|
/** |
| 140 |
|
* Paginate all records with relations from model repository. |