Merge branch 'adminkanryo' of https://github.com/nakazawakan/kikikanri into frontend
このコミットが含まれているのは:
コミット
4ab85c64d1
|
@ -469,7 +469,7 @@ class MeetingsController extends Controller {
|
|||
$child_select = ['image', 'last_name', 'first_name'];
|
||||
|
||||
// 取得に成功
|
||||
if (null === ($result = Meeting::select($meeting_select)->where('id', $meeting_id)->where('father_id', (int)$r->father_id)->first())) {
|
||||
if (null === ($result = Meeting::select($meeting_select)->where('id', (int)$meeting_id)->first())) {
|
||||
return ['status_code' => 400];
|
||||
}
|
||||
|
||||
|
@ -480,9 +480,9 @@ class MeetingsController extends Controller {
|
|||
return ['status_code' => 400];
|
||||
}
|
||||
|
||||
foreach ($result->approval as $i => $r) {
|
||||
if (null === ($result->approval[$i]['child'] = Child::select($child_select)->where('id', (int)$r->child_id)->first())) {
|
||||
return ['status_code' => 400];
|
||||
foreach ($result->approval as $i => $a) {
|
||||
if (null === ($result->approval[$i]['child'] = Child::select($child_select)->where('id', (int)$a->child_id)->first())) {
|
||||
$result->approval[$i]['child'] = [];
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -52,7 +52,9 @@ Route::group(['prefix' => 'admin'], function () {
|
|||
Route::get('/detail/{meeting_id}', '\App\Http\Controllers\Api\MeetingsController@detail');
|
||||
Route::put('/update/{meeting_id}', '\App\Http\Controllers\Api\MeetingsController@update');
|
||||
Route::delete('/delete/{meeting_id}', '\App\Http\Controllers\Api\MeetingsController@delete');
|
||||
});
|
||||
|
||||
Route::group(['prefix' => 'meeting'], function () {
|
||||
// MeetingImagesController
|
||||
Route::group(['prefix' => 'images'], function () {
|
||||
Route::post('/register', '\App\Http\Controllers\Api\MeetingImagesController@register');
|
||||
|
@ -105,7 +107,9 @@ Route::group(['prefix' => 'fathers'], function () {
|
|||
Route::get('/detail/{meeting_id}', '\App\Http\Controllers\Api\MeetingsController@detail');
|
||||
Route::put('/update/{meeting_id}', '\App\Http\Controllers\Api\MeetingsController@update');
|
||||
Route::delete('/delete/{meeting_id}', '\App\Http\Controllers\Api\MeetingsController@delete');
|
||||
});
|
||||
|
||||
Route::group(['prefix' => 'meeting'], function () {
|
||||
// MeetingImagesController
|
||||
Route::group(['prefix' => 'images'], function () {
|
||||
Route::post('/register', '\App\Http\Controllers\Api\MeetingImagesController@register');
|
||||
|
@ -158,7 +162,9 @@ Route::group(['prefix' => 'children'], function () {
|
|||
Route::get('/searchOfApprovalOfChild', '\App\Http\Controllers\Api\MeetingsController@searchOfApprovalOfChild');
|
||||
Route::get('/searchOfNonApprovalOfChild', '\App\Http\Controllers\Api\MeetingsController@searchOfNonApprovalOfChild');
|
||||
Route::get('/detail/{meeting_id}', '\App\Http\Controllers\Api\MeetingsController@detail');
|
||||
});
|
||||
|
||||
Route::group(['prefix' => 'meeting'], function () {
|
||||
// MeetingApprovalsController
|
||||
Route::group(['prefix' => 'approvals'], function () {
|
||||
Route::post('/registerApproval', '\App\Http\Controllers\Api\MeetingApprovalsController@registerApproval');
|
||||
|
|
新しいイシューから参照