2014-04-07 104 views
0
Route::get('/comment/{data}', function($data){ 


     if (Request::ajax()) { 

     //echo $data; *i checked here echo prints the content of $data but i cant store it in database. i dont know why its not store by using below code plz help me to find error. 

     $comm = new Data; 
     $comm->details = Input::get('data'); 
     $comm->save(); 

    } 
}); 
+0

從Ajax調用接收到數據庫中的數據我是新來laravel 4 plz幫助我恢復的錯誤在上面的代碼。它返回「500內部服務器錯誤」 –

回答

0
Route::post('/comment/{data}', function($data){ 
} 
+0

仍然相同的錯誤 –

+0

請評論您的代碼 –