title: Laravel 5 MethodNotAllowedHttpException in RouteCollection.php line 201:
body: <p>I have a number of php files in my project:</p>
  
  <p><code>admin.blade.php</code>: this files contains the admin form.</p>
  
  <p>When called it show the following error:</p>
  
  <blockquote>
    <p>MethodNotAllowedHttpException in RouteCollection.php line 201</p>
  </blockquote>
  
  <pre><code>&lt;h2&gt;Please Log In To Manage&lt;/h2&gt;
  &lt;form id="form1" name="form1" method="post" action="&lt;?=URL::to('/admin')?&gt;"&gt;
     &lt;input type="hidden" name="_token" value="{{ csrf_token() }}"&gt;
     User Name:&lt;br /&gt;
     &lt;input name="username" type="text" id="username" size="40" /&gt;
     &lt;br /&gt;&lt;br /&gt;
     Password:&lt;br /&gt;
     &lt;input name="password" type="password" id="password" size="40" /&gt;
     &lt;br /&gt;
     &lt;br /&gt;
     &lt;br /&gt;
     &lt;input type="submit" name="button" id="button" value="Log In" /&gt;
  &lt;/form&gt;
  </code></pre>
  
  <p>In <code>route.php</code>, this call is made:</p>
  
  <pre><code>Route::get('/admin',array('uses'=&gt;'student@admin'));
  </code></pre>
  
  <p>This is the function in <code>student.php</code></p>
  
  <pre><code>public function admin()
  {
      return View::make('student.admin');
      $validator = Validator::make($data = Input::all() , User::rules());
      if ($validator-&gt;fails())
      {
          return Redirect::back()-&gt;withErrors($validator)-&gt;withInput();
      }
      else
      {
          $check = 0;
          $check = DB::table('admin')-&gt;get();
          $username = Input::get('username');
          $password = Input::get('password');
          if (Auth::attempt(['username' =&gt; $username, 'password' =&gt; $password]))
          {
              return Redirect::intended('/');
          }
          return Redirect::back()-&gt;withInput()-&gt;withErrors('That username/password combo does not exist.');
      }
  }
  </code></pre>
  
  <p>I don't know much about creating an admin area, I am just trying to create it. </p>