| @@ 67-74 (lines=8) @@ | ||
| 64 | * |
|
| 65 | * @return callable |
|
| 66 | */ |
|
| 67 | protected function totalAmountResourceCallable() |
|
| 68 | { |
|
| 69 | return function () { |
|
| 70 | $idKey = $this->getDataModel()->getKeyName(); |
|
| 71 | ||
| 72 | return $this->getDataModel()->query()->get([$idKey])->count(); |
|
| 73 | }; |
|
| 74 | } |
|
| 75 | ||
| 76 | /** |
|
| 77 | * Returns an Eloquent Model. |
|
| @@ 125-129 (lines=5) @@ | ||
| 122 | */ |
|
| 123 | protected function findResourceCallable(Request $request) |
|
| 124 | { |
|
| 125 | return function () use ($request) { |
|
| 126 | $idKey = $this->getDataModel()->getKeyName(); |
|
| 127 | ||
| 128 | return $this->getDataModel()->query()->where($idKey, $request->id)->first(); |
|
| 129 | }; |
|
| 130 | } |
|
| 131 | ||
| 132 | /** |
|