public function run() { DB::table('event_types')->delete(); // Empty before we seed $eventTypes = array(array('name' => 'Ceremony', 'colour' => ''), array('name' => 'Big Game', 'colour' => '#19A601'), array('name' => 'Tournament', 'colour' => '#19A601'), array('name' => 'Food', 'colour' => '')); foreach ($eventTypes as $eventType) { EventType::create($eventType); } }
/** * Show the form for editing the specified resource. * * @param int $id * @return Response */ public function edit($id) { $event = Event::find($id); $eventTypes = array('' => ' ') + EventType::lists('name', 'id'); return View::make('lanager-core::event.edit')->with('title', 'Edit Event')->with('eventTypes', $eventTypes)->with('event', $event); }