From 142894c91b0a993938a4cc51c80533ae9df93391 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E3=83=86=E3=82=AF=E3=83=8B=E3=82=AB=E3=83=AB=E8=AB=8F?= =?UTF-8?q?=E8=A8=AA=E5=AD=90?= Date: Sat, 25 Dec 2021 01:36:53 +0900 Subject: [PATCH] =?UTF-8?q?=E3=80=8C=E6=A4=9C=E7=B4=A2=E6=A9=9F=E8=83=BD?= =?UTF-8?q?=E3=81=8C=E3=81=8A=E3=81=8B=E3=81=97=E3=81=84=E3=81=A7=E3=81=99?= =?UTF-8?q?=E3=80=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Controllers/Api/MeetingsController.php | 4 +- backend/database/seeders/DatabaseSeeder.php | 42 +++++++------------ 2 files changed, 16 insertions(+), 30 deletions(-) diff --git a/backend/app/Http/Controllers/Api/MeetingsController.php b/backend/app/Http/Controllers/Api/MeetingsController.php index e76dc2fe..37783389 100644 --- a/backend/app/Http/Controllers/Api/MeetingsController.php +++ b/backend/app/Http/Controllers/Api/MeetingsController.php @@ -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('updated_at', 'desc')->get())) { + if (null === ($list = Meeting::select($meeting_select)->where('title', 'LIKE', '%'.$r->keyword.'%')->orWhere('text', 'LIKE', '%'.$r->keyword.'%')->where('father_id', (int)$r->father_id)->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('updated_at', 'desc')->get())) { + if (null === ($list = Meeting::select($meeting_select)->where('title', 'LIKE', '%'.$r->keyword.'%')->orWhere('text', 'LIKE', '%'.$r->keyword.'%')->where('father_id', (int)$r->father_id)->orderBy('updated_at', 'desc')->get())) { $list = []; } diff --git a/backend/database/seeders/DatabaseSeeder.php b/backend/database/seeders/DatabaseSeeder.php index cc1a6416..7c06c43e 100644 --- a/backend/database/seeders/DatabaseSeeder.php +++ b/backend/database/seeders/DatabaseSeeder.php @@ -4,38 +4,24 @@ namespace Database\Seeders; use Illuminate\Database\Seeder; -class DatabaseSeeder extends Seeder -{ +class DatabaseSeeder extends Seeder { /** * Seed the application's database. * * @return void */ - public function run() - { - $this->call - (AdminsTableSeeder::class); - $this->call - (FathersTableSeeder::class); - $this->call - (EmailActivationsTableSeeder::class); - $this->call - (ChildrenTableSeeder::class); - $this->call - (TelActivationsTableSeeder::class); - $this->call - (FatherRelationsTableSeeder::class); - $this->call - (MeetingsTableSeeder::class); - $this->call - (MeetingImagesTableSeeder::class); - $this->call - (MeetingApprovalsSeeder::class); - $this->call - (LoginLimitsSeeder::class); - $this->call - (ContactsSeeder::class); - $this->call - (SmssSeeder::class); + public function run () { + $this->call(AdminsTableSeeder::class); + $this->call(FathersTableSeeder::class); + $this->call(EmailActivationsTableSeeder::class); + $this->call(ChildrenTableSeeder::class); + $this->call(TelActivationsTableSeeder::class); + $this->call(FatherRelationsTableSeeder::class); + $this->call(MeetingsTableSeeder::class); + $this->call(MeetingImagesTableSeeder::class); + $this->call(MeetingApprovalsSeeder::class); + $this->call(LoginLimitsSeeder::class); + $this->call(ContactsSeeder::class); + $this->call(SmssSeeder::class); } }