@@ -48,9 +48,9 @@ discard block |
||
| 48 | 48 | ->orderBy(\DB::raw("things.properties::json#>>'{name,nob}'")) |
| 49 | 49 | ->get(); |
| 50 | 50 | |
| 51 | - $things = $things->map(function ($thing) use ($libraryId) { |
|
| 51 | + $things = $things->map(function($thing) use ($libraryId) { |
|
| 52 | 52 | $all = $thing->items->whereNotIn('barcode', [null]); |
| 53 | - $avail = $all->filter(function (Item $item) { |
|
| 53 | + $avail = $all->filter(function(Item $item) { |
|
| 54 | 54 | return is_null($item->activeLoan); |
| 55 | 55 | }); |
| 56 | 56 | $mine = $all->where('library_id', $libraryId); |
@@ -96,12 +96,12 @@ discard block |
||
| 96 | 96 | $things = $things->orderBy(\DB::raw("things.properties::json#>>'{name,nob}'"))->get(); |
| 97 | 97 | |
| 98 | 98 | if ($request->input('withoutBarcode')) { |
| 99 | - $things = $things->filter(function ($thing) { |
|
| 99 | + $things = $things->filter(function($thing) { |
|
| 100 | 100 | return $thing->library_settings->loans_without_barcode; |
| 101 | 101 | })->values(); |
| 102 | 102 | } |
| 103 | 103 | |
| 104 | - $things = $things->map(function ($thing) { |
|
| 104 | + $things = $things->map(function($thing) { |
|
| 105 | 105 | return [ |
| 106 | 106 | 'id' => $thing->id, |
| 107 | 107 | 'type' => 'thing', |
@@ -92,7 +92,7 @@ discard block |
||
| 92 | 92 | |
| 93 | 93 | if ($request->items && strtolower($request->items) !== 'false') { |
| 94 | 94 | $query->with([ |
| 95 | - 'items' => function ($query) use ($request) { |
|
| 95 | + 'items' => function($query) use ($request) { |
|
| 96 | 96 | if (isset($request->library)) { |
| 97 | 97 | $query->where('library_id', '=', $request->library); |
| 98 | 98 | } |
@@ -103,7 +103,7 @@ discard block |
||
| 103 | 103 | } |
| 104 | 104 | |
| 105 | 105 | if (isset($request->library)) { |
| 106 | - $query->whereHas('items', function ($itemQuery) use ($request) { |
|
| 106 | + $query->whereHas('items', function($itemQuery) use ($request) { |
|
| 107 | 107 | $itemQuery->where('library_id', '=', $request->library); |
| 108 | 108 | }); |
| 109 | 109 | } |