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(); } }
public function kidsHope() { $kids_hope = Organization::whereSlug('kids-hope-usa')->first(); return view('kids-hope', ['kids_hope' => $kids_hope]); }