Laravel ajax 404 not found error
<p>am getting an ajax 404 error while using laravel 5.0 and ajax and I cannot figure out why. </p>

<p><strong>My routes</strong></p>

<pre><code>Route::post('user/saved/ [
'as' =&gt; 'delete-topics',
'uses' =&gt; 'TopicController@deleteTopic',    
]);
</code></pre>

<p><strong>My form</strong></p>

<pre><code>    &lt;form action="{{action('TopicController@deleteTopic')}}" method="post" class="deleteform"&gt;
        &lt;input type="hidden" name="topic_id" value="{{$topic-&gt;topic_id}}"&gt;

        &lt;input type="submit" value="delete"&gt;
        &lt;/form&gt;
</code></pre>

<p><strong>My ajax call</strong></p>

<pre><code>  // process the form
 $('.deleteform').submit(function(event) {
event.preventDefault();
  var $form = $(this);


  var formData = {
    topic_id    : $form.find('input[name=topic_id]').val()
};  


// process the form
$.ajax({
  type    : 'POST', 
  url     : 'saved',
  data    : formData, 
  dataType  : 'json', 
  encode    : true
})
</code></pre>

<p><strong>My Controller</strong></p>

<pre><code>public function deleteTopic()
{

    $topic_id = Request::get('topic_id');

    if(Auth::check())
    {
        $user_id = Auth::user()-&gt;id;
    $delete_topic = DB::table('topic_save')-&gt;where('user_id', $user_id)-&gt;where('topic_id', $topic_id)-&gt;delete();
    }


    $data['success']  =  true; 
    $data['message']  =  'success';
    echo json_encode($data);
}
</code></pre>

<p>I have tried changing the url in the ajax call to 'user/saved' to match the routes but am still getting the same 404 error</p>

<p>Thanks guys.</p>