public function run() { $template = Template::create(array('title' => 'Web Design')); $deliverable = TemplateSection::create(array('template_id' => $template->id, 'section_type' => 'Deliverable', 'help_text' => 'This is the help text.', 'title' => 'Information Architecture', 'body' => 'This is the body of the deliverable. It is very awesome. Oh yeah.')); $requirement = TemplateSection::create(array('template_id' => $template->id, 'section_type' => 'Requirement', 'help_text' => 'This is the help text.', 'title' => 'Open-sourced code.', 'body' => 'This is the body of the requirement. Mhm.')); }
public function action_step4() { $view = View::make('home.step4'); $view->sow = Config::get('sow'); $view->requirements = TemplateSection::where('template_id', '=', $view->sow->based_on_template_id)->where('section_type', '=', 'Requirement')->get(); $view->custom_requirements = $view->sow->sow_sections()->where('section_type', '=', 'Requirement')->where_null('based_on_template_section_id')->get(); $this->layout->content = $view; }