I am using following code in javascript function
$.ajax({
type: "DELETE",
url: '/delprofile',
success:alert("Record deleted."),
error: alert("Record not deleted.")
});
and my route and function are as :
public function delprofile (Request $request){
DB::table('education')->where('id','=',7)->delete();
return true;
}
Route::post('/delprofile','ProfileController@delprofile');
The query is not performing any deletion.