public function getView($tid = false) { // Do our checks to make sure things are in place if ($tid) { $match = Match::find($tid); if ($match) { $this->data['leagues'] = League::all(); $this->data['teams'] = Team::all(); $this->data['match'] = $match; $this->layout->content = View::make($this->view . '.edit.match', $this->data); } else { return Redirect::action('Admin_MatchesController@getIndex'); } } else { return Redirect::action('Admin_MatchesController@getIndex'); } }