public function run() { $activiy_id = Input::get('activity_id', 0); $r = ActivityORM::find($activiy_id); if (empty($r)) { return '没有该活动信息'; } return $r; }
public function show() { $id = (int) Input::get('id', 0); $activity = ActivityORM::find($id); if ($id > 0 && empty($activity)) { Session::flash('error', '活动未找到'); return Redirect::route('activityLists'); } return View::make('activity.show', ['row' => $activity, 'id' => $id]); }