@@ 145-148 (lines=4) @@ | ||
142 | } |
|
143 | } |
|
144 | ||
145 | foreach ($projects as $key => $project) |
|
146 | { |
|
147 | $projects[$key]['principal']['nameAndEmail'] = $project['principal']['name'] . '(' . $project['principal']['email'] . ')'; |
|
148 | } |
|
149 | ||
150 | $syssetting = SysSetting::first(); |
|
151 | $allow_create_project = isset($syssetting->properties['allow_create_project']) ? $syssetting->properties['allow_create_project'] : 0; |
|
@@ 393-396 (lines=4) @@ | ||
390 | $page = $request->input('page') ?: 1; |
|
391 | $query = $query->skip($page_size * ($page - 1))->take($page_size); |
|
392 | $projects = $query->get([ 'name', 'key', 'description', 'status', 'principal' ]); |
|
393 | foreach ($projects as $key => $project) |
|
394 | { |
|
395 | $projects[$key]['principal']['nameAndEmail'] = $project['principal']['name'] . '(' . $project['principal']['email'] . ')'; |
|
396 | } |
|
397 | ||
398 | return response()->json([ 'ecode' => 0, 'data' => parent::arrange($projects), 'options' => [ 'total' => $total, 'sizePerPage' => $page_size ] ]); |
|
399 | } |