title: 405 Method not allowed - ajax request with laravel route
body: <p>Calling an ajax function should be done this way and I have done it multiple times.This time I keep getting <code>405 method not allowed</code>.I know this issue is known but I have tried suggested solutions and still nothing works.
  Here's my controller:</p>
  
  <pre><code>public function playGame($custom_url)
      {
          $project = Project::where('custom_url', $custom_url)-&gt;where('approved', 1)-&gt;first();
          if(Request::isMethod('post'))
          {
              $project-&gt;play_count = $project-&gt;play_count+1;
              $project-&gt;save();
              return json_encode(array('status'=&gt;array('saved')));
          }
          return View::make('game.index');
      }
  </code></pre>
  
  <p>index.blade.php:</p>
  
  <pre><code>&lt;title&gt;Tennra&lt;/title&gt;
          &lt;link rel="shortcut icon" href="favicon.png"/&gt;
  
          &lt;link href="{{URL::asset('game/style.css')}}" rel="stylesheet" type='text/css'&gt;
          &lt;link href="{{URL::asset('game/menu.css')}}" rel="stylesheet" type='text/css'&gt;
          &lt;script type="text/javascript" src="{{URL::asset('game/jq.js')}}"&gt;&lt;/script&gt;
          &lt;script type="text/javascript" src="{{URL::asset('game/mainMenu.js')}}"&gt;&lt;/script&gt;
          &lt;script type="text/javascript" src="{{URL::asset('game/game.js')}}"&gt;&lt;/script&gt;
          &lt;script type="text/javascript" src="{{URL::asset('game/main.js')}}"&gt;&lt;/script&gt;
      &lt;/head&gt;
  
      &lt;body&gt;
  
      &lt;/body&gt;
  </code></pre>
  
  <p>games.js:</p>
  
  <pre><code>function startedGame() {
      /*********************************
      **********************************
      ***   Add Code Here if Needed  ***
      **********************************
      *********************************/
  
      $.ajax({
          type: "post",
          data: null,
          url: "{{URL::route('projects.game')}}"
        }).done(function( msg )
        {
          msg=JSON.parse(msg);
          if(msg['errors'])
          {
          }
          else if(msg['status'])
          {
              console.log(true);
          }
        });
  }
  </code></pre>