我有问题。
我正在尝试将值插入数据库,但问题是,它不会进入数据库,也不会显示错误消息。
我的roues.php is
Route::group(array('prefix' =>'/addteacherlist'),function()
{
Route::get('/', array('uses'=>'AddteacherlistController@addteacherlist','as'=>'addteacherlist'));
Route::post('/', array('uses'=>'AddteacherlistController@getteacherlist','as'=>'getteacherlist'));
});
我的controller.php
$user=new ForumTeacher();
$user->tname=Input::get('tname');
$user->tmobile=Input::get('tmobile');
$user->ttype=Input::get('ttype');
$user->tcls=Input::get('tcls');
$user->tdivn=Input::get('tdivn');
$user->tsubject=Input::get('tsubject');
if($user->save()) {
return Redirect::route('teacherlist') ->with('success','you entered sucessfully.');
}