インデントは4つ
このコミットが含まれているのは:
コミット
b3ee0c2d33
|
@ -24,6 +24,7 @@ class MeetingsController extends Controller {
|
|||
'memo' => 'max:2000',
|
||||
'pdf' => 'mimes:pdf'
|
||||
]);
|
||||
|
||||
if ($validate->fails()) {
|
||||
return ['status_code' => 422, 'error_messages' => $validate->errors()];
|
||||
}
|
||||
|
@ -58,7 +59,7 @@ class MeetingsController extends Controller {
|
|||
}
|
||||
|
||||
public function list () {
|
||||
// adminsのみ
|
||||
// TODO:adminsのみ
|
||||
$result = [];
|
||||
$meeting_select = ['id', 'father_id', 'title', 'text', 'memo', 'updated_at'];
|
||||
$meeting_images_select = ['image'];
|
||||
|
@ -264,10 +265,7 @@ class MeetingsController extends Controller {
|
|||
}
|
||||
|
||||
public function searchOfApprovalOfChild (Request $r) {
|
||||
if (!isset($r->child_id)) {
|
||||
return ['status_code' => 400];
|
||||
}
|
||||
if (!isset($r->keyword)) {
|
||||
if (!isset($r->child_id) || !isset($r->keyword)) {
|
||||
return ['status_code' => 400];
|
||||
}
|
||||
|
||||
|
@ -292,10 +290,7 @@ class MeetingsController extends Controller {
|
|||
}
|
||||
|
||||
public function searchOfNonApprovalOfChild (Request $r) {
|
||||
if (!isset($r->child_id)) {
|
||||
return ['status_code' => 400];
|
||||
}
|
||||
if (!isset($r->keyword)) {
|
||||
if (!isset($r->child_id) || !isset($r->keyword)) {
|
||||
return ['status_code' => 400];
|
||||
}
|
||||
|
||||
|
@ -320,12 +315,7 @@ class MeetingsController extends Controller {
|
|||
}
|
||||
|
||||
public function searchOfCompleteofFather (Request $r) {
|
||||
$r->father_id = 1;
|
||||
$r->keyword = '母';
|
||||
if (!isset($r->father_id)) {
|
||||
return ['status_code' => 400];
|
||||
}
|
||||
if (!isset($r->keyword)) {
|
||||
if (!isset($r->father_id) || !isset($r->keyword)) {
|
||||
return ['status_code' => 400];
|
||||
}
|
||||
|
||||
|
@ -355,10 +345,7 @@ class MeetingsController extends Controller {
|
|||
}
|
||||
|
||||
public function searchOfIncompleteofFather (Request $r) {
|
||||
if (!isset($r->father_id)) {
|
||||
return ['status_code' => 400];
|
||||
}
|
||||
if (!isset($r->keyword)) {
|
||||
if (!isset($r->father_id) || !isset($r->keyword)) {
|
||||
return ['status_code' => 400];
|
||||
}
|
||||
|
||||
|
@ -388,7 +375,6 @@ class MeetingsController extends Controller {
|
|||
}
|
||||
|
||||
public function detail (Request $r, $meeting_id) {
|
||||
$r->father_id = 1;
|
||||
if (!isset($r->father_id)) {
|
||||
return ['status_code' => 400];
|
||||
}
|
||||
|
@ -420,7 +406,9 @@ class MeetingsController extends Controller {
|
|||
|
||||
public function delete ($meeting_id) {
|
||||
// 削除成功
|
||||
if (Meetings::where('meeting_id', $meeting_id)->delete()) return ['status_code' => 200];
|
||||
if (Meetings::where('meeting_id', $meeting_id)->delete()) {
|
||||
return ['status_code' => 200];
|
||||
}
|
||||
|
||||
// 削除失敗
|
||||
return ['status_code' => 400];
|
||||
|
@ -428,7 +416,9 @@ class MeetingsController extends Controller {
|
|||
|
||||
public function deleteRelationFather ($father_id) {
|
||||
// 削除成功
|
||||
if (Meetings::where('father_id', $father_id)->delete()) return ['status_code' => 200];
|
||||
if (Meetings::where('father_id', $father_id)->delete()) {
|
||||
return ['status_code' => 200];
|
||||
}
|
||||
|
||||
// 削除失敗
|
||||
return ['status_code' => 400];
|
||||
|
|
新しいイシューから参照