コミット
b06adb3977
@ -90,12 +90,12 @@ class ChildrenController extends Controller {
|
||||
|
||||
public function checkRegisterMain (Request $r) {
|
||||
// トークンの確認
|
||||
if (null === ($get = TelActivation::where('token', $r->token)->first())) {
|
||||
if (null === ($get = TelActivation::select('id')->where('token', $r->token)->first())) {
|
||||
return ['status_code' => 400, 'error_messages' => ['不正な登録トークン。']];
|
||||
}
|
||||
|
||||
// 本登録に成功
|
||||
return ['status_code' => 200];
|
||||
return ['status_code' => 200, 'params' => $get];
|
||||
}
|
||||
|
||||
public function registerMain (Request $r) {
|
||||
@ -317,7 +317,7 @@ class ChildrenController extends Controller {
|
||||
$child_select = ['id', 'image', 'last_name', 'first_name', 'tel'];
|
||||
$meeting_approvals_select = ['approval_at'];
|
||||
|
||||
if (null === ($list = MeetingApprovals::select($meeting_approvals_select)->where('meeting_id', (int)$r->meeting_id)->whereNull('approval_at')->get())) {
|
||||
if (null === ($list = MeetingApprovals::select($meeting_approvals_select)->where('meeting_id', (int)$r->meeting_id)->whereNull('approval_at')->orderBy('created_at', 'desc')->get())) {
|
||||
return ['status_code' => 400];
|
||||
}
|
||||
|
||||
@ -340,7 +340,7 @@ class ChildrenController extends Controller {
|
||||
$child_select = ['id', 'image', 'last_name', 'first_name', 'tel'];
|
||||
$meeting_approvals_select = ['approval_at'];
|
||||
|
||||
if (null === ($list = MeetingApprovals::select($meeting_approvals_select)->where('meeting_id', $r->meeting_id)->whereNotNull('approval_at')->get())) {
|
||||
if (null === ($list = MeetingApprovals::select($meeting_approvals_select)->where('meeting_id', $r->meeting_id)->whereNotNull('approval_at')->orderBy('created_at', 'desc')->get())) {
|
||||
return ['status_code' => 400];
|
||||
}
|
||||
|
||||
|
@ -317,7 +317,7 @@ class FathersController extends Controller {
|
||||
abort_if(null === session()->get('children') || null === ($rel = FatherRelation::where('father_id', (int)$father_id)->where('child_id', (int)session()->get('children')['id'])->first()), 404, $err);
|
||||
}
|
||||
|
||||
if (null === ($result = Father::select($father_select)->where('id', (int)$father_id)->orderBy('created_at', 'desc')->first())) {
|
||||
if (null === ($result = Father::select($father_select)->where('id', (int)$father_id)->first())) {
|
||||
// 親詳細の取得に失敗
|
||||
return ['status_code' => 400, 'error_messages' => ['親の更新に失敗しました。']];
|
||||
}
|
||||
|
@ -189,7 +189,7 @@ class MeetingsController extends Controller {
|
||||
$meeting_approvals_select = ['child_id', 'approval_at'];
|
||||
|
||||
// 取得に成功
|
||||
if (null === ($list = Meeting::select($meeting_select)->where('title', 'LIKE', '%'.$r->keyword.'%')->orWhere('text', 'LIKE', '%'.$r->keyword.'%')->orderBy('created_at', 'desc')->get())) {
|
||||
if (null === ($list = Meeting::select($meeting_select)->where('title', 'LIKE', '%'.$r->keyword.'%')->orWhere('text', 'LIKE', '%'.$r->keyword.'%')->orderBy('updated_at', 'desc')->get())) {
|
||||
return ['status_code' => 400];
|
||||
}
|
||||
|
||||
@ -216,7 +216,7 @@ class MeetingsController extends Controller {
|
||||
$meeting_approvals_select = ['child_id', 'approval_at'];
|
||||
|
||||
// 取得に成功
|
||||
if (null === ($list = Meeting::select($meeting_select)->orderBy('created_at', 'desc')->get())) {
|
||||
if (null === ($list = Meeting::select($meeting_select)->orderBy('updated_at', 'desc')->get())) {
|
||||
return ['status_code' => 400];
|
||||
}
|
||||
|
||||
@ -287,7 +287,7 @@ class MeetingsController extends Controller {
|
||||
$meeting_approvals_select = ['approval_at'];
|
||||
|
||||
// 取得に成功
|
||||
if (null === ($approval = MeetingApprovals::select('meeting_id')->where('child_id', (int)$r->child_id)->whereNull('approval_at')->orderBy('approval_at', 'asc')->get())) {
|
||||
if (null === ($approval = MeetingApprovals::select('meeting_id')->where('child_id', (int)$r->child_id)->whereNull('approval_at')->orderBy('updated_at', 'asc')->get())) {
|
||||
return ['status_code' => 400];
|
||||
}
|
||||
|
||||
@ -325,7 +325,7 @@ class MeetingsController extends Controller {
|
||||
$child_select = ['image'];
|
||||
|
||||
// 取得に成功
|
||||
if (null === ($list = Meeting::select($meeting_select)->where('father_id', (int)$r->father_id)->orderBy('created_at', 'desc')->get())) {
|
||||
if (null === ($list = Meeting::select($meeting_select)->where('father_id', (int)$r->father_id)->orderBy('updated_at', 'desc')->get())) {
|
||||
return ['status_code' => 400];
|
||||
}
|
||||
|
||||
@ -372,7 +372,7 @@ class MeetingsController extends Controller {
|
||||
$child_select = ['image'];
|
||||
|
||||
// 取得に成功
|
||||
if (null === ($list = Meeting::select($meeting_select)->where('father_id', (int)$r->father_id)->orderBy('created_at', 'desc')->get())) {
|
||||
if (null === ($list = Meeting::select($meeting_select)->where('father_id', (int)$r->father_id)->orderBy('updated_at', 'desc')->get())) {
|
||||
return ['status_code' => 400];
|
||||
}
|
||||
|
||||
@ -413,7 +413,7 @@ class MeetingsController extends Controller {
|
||||
$child_select = ['image'];
|
||||
|
||||
// 取得に成功
|
||||
if (null === ($list = Meeting::select($meeting_select)->where('father_id', (int)$r->father_id)->where('is_favorite', 1)->orderBy('created_at', 'desc')->get())) {
|
||||
if (null === ($list = Meeting::select($meeting_select)->where('father_id', (int)$r->father_id)->where('is_favorite', 1)->orderBy('updated_at', 'desc')->get())) {
|
||||
return ['status_code' => 400];
|
||||
}
|
||||
|
||||
@ -481,7 +481,7 @@ class MeetingsController extends Controller {
|
||||
$meeting_approvals_select = ['approval_at'];
|
||||
|
||||
// 取得に成功
|
||||
if (null === ($list = Meeting::select($meeting_select)->where('title', 'LIKE', '%'.$r->keyword.'%')->orWhere('text', 'LIKE', '%'.$r->keyword.'%')->get())) {
|
||||
if (null === ($list = Meeting::select($meeting_select)->where('title', 'LIKE', '%'.$r->keyword.'%')->orWhere('text', 'LIKE', '%'.$r->keyword.'%')->orderBy('created_at', 'desc')->get())) {
|
||||
$list = [];
|
||||
}
|
||||
|
||||
@ -515,7 +515,7 @@ class MeetingsController extends Controller {
|
||||
$meeting_approvals_select = ['approval_at'];
|
||||
|
||||
// 取得に成功
|
||||
if (null === ($list = Meeting::select($meeting_select)->where('title', 'LIKE', '%'.$r->keyword.'%')->orWhere('text', 'LIKE', '%'.$r->keyword.'%')->get())) {
|
||||
if (null === ($list = Meeting::select($meeting_select)->where('title', 'LIKE', '%'.$r->keyword.'%')->orWhere('text', 'LIKE', '%'.$r->keyword.'%')->orderBy('created_at', 'desc')->get())) {
|
||||
$list = [];
|
||||
}
|
||||
|
||||
@ -549,7 +549,7 @@ class MeetingsController extends Controller {
|
||||
$child_select = ['image'];
|
||||
|
||||
// 取得に成功
|
||||
if (null === ($list = Meeting::select($meeting_select)->where('father_id', (int)$r->father_id)->where('title', 'LIKE', '%'.$r->keyword.'%')->orWhere('text', 'LIKE', '%'.$r->keyword.'%')->orderBy('created_at', 'desc')->get())) {
|
||||
if (null === ($list = Meeting::select($meeting_select)->where('father_id', (int)$r->father_id)->where('title', 'LIKE', '%'.$r->keyword.'%')->orWhere('text', 'LIKE', '%'.$r->keyword.'%')->orderBy('updated_at', 'desc')->get())) {
|
||||
$list = [];
|
||||
}
|
||||
|
||||
@ -596,7 +596,7 @@ class MeetingsController extends Controller {
|
||||
$child_select = ['image'];
|
||||
|
||||
// 取得に成功
|
||||
if (null === ($list = Meeting::select($meeting_select)->where('father_id', (int)$r->father_id)->where('title', 'LIKE', '%'.$r->keyword.'%')->orWhere('text', 'LIKE', '%'.$r->keyword.'%')->orderBy('created_at', 'desc')->get())) {
|
||||
if (null === ($list = Meeting::select($meeting_select)->where('father_id', (int)$r->father_id)->where('title', 'LIKE', '%'.$r->keyword.'%')->orWhere('text', 'LIKE', '%'.$r->keyword.'%')->orderBy('updated_at', 'desc')->get())) {
|
||||
$list = [];
|
||||
}
|
||||
|
||||
|
新しいイシューから参照
ユーザーをブロックする