Upon form submission I run this ajax:
$gradeID=$('#GradeID').val();
$.ajax({
method: "POST",
url: "grades/ajaxprice",
data: { gradeID: $gradeID}
})
.done(function( msg ) {
alert( "Data Saved: " + msg );
});
In my controller I have this:
public function getgradeprice()
{
// $gradeID = Input::get('gradeID');
// dd($gradeID);
}
Here is the route:
Route::get('grades/ajaxprice', 'GradesController@ajaxGradePrice');
But then I am getting this error:
405 Method Not Allowed.
What could be wrong?