public function checkTitle($title) { $rs = Training::where('title', '=', $title)->count(); if (isset($rs)) { return $rs >= 1 ? false : true; } }
/** * [delTraining description] * @param [type] $train_id [description] * @return [type] [description] */ public function delTraining($train_id) { Training::where('id', '=', $train_id)->delete(); return Redirect::to('/training')->with('success', 'ลบทิ้งหลักสูตรสำเร็จ'); }