コード例 #1
0
 public function run()
 {
     DB::table('project_apus')->delete();
     $collection = [['project_id' => 1, 'position' => 'APU', 'engine_type_variant' => 'PW-901A', 'owner' => 'leased', 'task' => 'return to owner', 'stand_provider' => 'ADC', 'MPA' => true, 'boroscope' => false, 'storage_program' => false]];
     foreach ($collection as $record) {
         ProjectApu::create($record);
     }
 }
コード例 #2
0
 public function apuByProject($id)
 {
     return ProjectApu::where('project_id', $id)->first();
 }