public function background_and_scope() { $section = SowSection::where('sow_id', '=', $this->id)->where('section_type', '=', 'Background & Scope')->first(); if ($section) { return $section->body; } }
public function action_step5_post() { $sow = Config::get('sow'); $sow->title = Input::get('title'); $sow->body = false; if (Input::get('custom_sections')) { foreach (Input::get('custom_sections') as $key => $val) { $section = SowSection::find($key); $section->body = $val; $section->save(); } } if (Input::get('variables')) { foreach (Input::get('variables') as $key => $val) { $sow->add_variable($key, $val); } } $sow->save(); return Redirect::to(route('step6', array($sow->uuid))); }