コード例 #1
0
 private function importOrganizations()
 {
     $table = 'organizations';
     $items = $this->getOrganizations();
     Organization::unguard();
     DB::table($table)->truncate();
     foreach ($items as $item) {
         $model = new Organization(get_object_vars($item));
         $model->save();
     }
 }
コード例 #2
0
 public function kidsHope()
 {
     $kids_hope = Organization::whereSlug('kids-hope-usa')->first();
     return view('kids-hope', ['kids_hope' => $kids_hope]);
 }