Laravel 5中的RouteCollection.php中的MethodNotAllowedHttpException

routes.php

Route::get('/',array('uses'=>'student@index'));
Route::get('/view',array('uses'=>'student@view'));
Route::post('/save',array('uses'=>'student@save'));

This is the code and I am working on form and when I submit the form, it shows this error:

MethodNotAllowedHttpException in RouteCollection.php line 201:

student.php

class student extends Controller  {

    public function index()
     {   
         //return 'hello world';

        return \View::make('student.index');
      }
          public function view()
     {
        return \View::make('student.view');
      }

          public function save()
     {
        //return \View::make('student.view');

        $validation= array(
                      'first_name'=>'required',

                      'email'=>'required'

                          );
        $v1=validator::make(Input::all(),$validation);
        if( $v1->fails())
        {
        return Redirect::to('view')->withErrors($v1);
        }
        else
        { $poststudent=Input::all();
          $data = array('first_name'=>$poststudent['first_name'],
                         'last_name'=>$poststudent['last_name'],
                         'email'=>$poststudent['email'],
                         'interested'=>$poststudent['interested'], 
                         'skills'=>$poststudent['skills']);

        $check=0;
        $check=DB::table('students')->insert($data);

        if($check > 0)
        {
        return Redirect::to('/');
        }
        else
        {
        return Redirect::to('/view');
        }

        }



      }

        }

Form is like this:

<form action="<?=URL::to('/save')?>" methed="POST">
<div class="form-group">
 <label for= "first_name"> FIRST NAME </label>
<input name="FIRST NAME" type="text" value="" class="form-control" id="first       name"/>
</div>

I am stuck here.

Well, you need to configure your allowed HTTP methods in httpd.conf if you are on Apache server.

Add this line into your httpd.conf the <Directory XXXX> tag:

AllowMethods GET POST OPTIONS
  1. You need to name the routes: see my reply here: https://stackoverflow.com/a/47147452/5550606
  2. Please put the {{ csrf_field() }} right after the <form>... tag. Or you will get a TokenMissmatch exception.