title: How Call the method of the controller from jquery ajax?, from laravel. Get request 404 not found url
body: <p>I have got my modal, here code</p>
  
  <pre><code>&lt;!-- Modal --&gt;
          &lt;div class="modal fade" id="box-modal" tabindex="-1" role="dialog" aria-labelledby="myModal" aria-hidden="true"&gt;
              &lt;div class="modal-dialog"&gt;
                  &lt;div class="modal-content"&gt;
                      &lt;div class="modal-header"&gt;
                          &lt;button type="button" class="close" data-dismiss="modal" aria-hidden="true"&gt;&amp;times;&lt;/button&gt;
                          &lt;h4 class="modal-title"&gt;&lt;!-- Aqui va el titulo de la pagina modal --&gt;@yield('modal_title')&lt;/h4&gt;
                      &lt;/div&gt;
                      &lt;div class="modal-body"&gt;
                           @yield('modal_body')
                          &lt;div class="alert hidden" id="modal-alert"&gt;&lt;/div&gt;
                          &lt;!--Aqui va el cuerpo de la página modal --&gt;
  
  
                      &lt;/div&gt;
                      &lt;div class="modal-footer"&gt;
                      &lt;!-- Aquí va el pie de la pagina modal --&gt;
                      @yield('modal_footer')
                      &lt;/div&gt;
                  &lt;/div&gt;
              &lt;/div&gt;
          &lt;/div&gt;
          &lt;!-- Fin de Modal --&gt;
  </code></pre>
  
  <p>I call to my modal with a link</p>
  
  <pre><code>&lt;a id="link-modal" class='btn btn-primary pull-right' data-toggle='modal' data-target="#box-modal"&gt;&lt;i class='fa fa-plus'&gt;&lt;/i&gt; Alta usuario&lt;/a&gt;
  </code></pre>
  
  <p>Inside of my modal in modal_body I show a form:</p>
  
  <pre><code>@section('modal_body')
      {{ Form::open(array('id' =&gt;'formuser-create', 'role' =&gt; 'form', 'class' =&gt; 'form-horizontal')) }}
              &lt;div class="form-group"&gt;
                  {{ Form::label('inputuser', 'Nombre de usuario', array('class' =&gt; 'col-md-4 control-label')) }}
                  &lt;div class="col-md-5"&gt;
                      {{ Form::text('inputuser','', array('placeholder' =&gt; 'Introduce la contraseña...', 'class' =&gt; 'form-control input-md')) }}   
                  &lt;/div&gt;
              &lt;/div&gt;
              &lt;div class="form-group"&gt;
                  {{ Form::label('inputpassword', 'Contraseña', array('class' =&gt; 'col-md-4 control-label')) }}
                  &lt;div class="col-md-5"&gt;
                      {{ Form::password('inputpassword','', array('placeholder' =&gt; 'Introduce la contraseña...', 'class' =&gt; 'form-control input-md')) }}
                  &lt;/div&gt;
              &lt;/div&gt;
              &lt;div class="form-group"&gt;
                  {{ Form::label('inputpassword1', 'Confirmar constraseña', array('class' =&gt; 'col-md-4 control-label')) }}
                  &lt;div class="col-md-5"&gt;
                      {{ Form::password('inputpassword1','', array('placeholder' =&gt; 'Vuelve a introducir la contraseña...', 'class' =&gt; 'form-control input-md')) }}
                  &lt;/div&gt;
              &lt;/div&gt;
              &lt;div class="form-group"&gt;
                  {{ Form::label('inputemail', 'Email', array('class' =&gt; 'col-md-4 control-label')) }}
                  &lt;div class="col-md-5"&gt;
                      {{ Form::text('inputemail','', array('placeholder' =&gt; 'Introduce el email...', 'class' =&gt; 'form-control input-md')) }} 
                  &lt;/div&gt;
              &lt;/div&gt;
              &lt;div class="form-group"&gt;
                  {{ Form::label('es_admin', '¿Es administrador?', array('class' =&gt; 'col-md-4 control-label')) }}
                  &lt;div class="col-md-5"&gt;
                      {{ Form::checkbox('es_admin',1,false) }}
                  &lt;/div&gt;
              &lt;/div&gt;
      {{ Form::close() }}  
  @stop
  @section('modal_footer')
  &lt;div class='form-group text-center' id='editor-actions'&gt;
      {{ Form::submit('Guardar', ['class' =&gt; 'btn btn-success']) }} 
      {{ Form::reset('Limpiar', ['class' =&gt; 'btn btn-primary']) }}
  &lt;/div&gt;
  @stop
  </code></pre>
  
  <p>When I press the button submit, I want to call to the method 'Create' of the Controller, for add an user. I make it with jquery ajax</p>
  
  <pre><code>   $("formuser-create#submit").on("submit",function(e)
     {
          e.preventDefault();
          var request = $.ajax({
              type:'POST',
              url:'users/Create',
              data:$("#formuser-create").serialize()   
          });
          request.fail(function(jqXHR, exception)
          {
              if(jqXHR.status === 500)
              {
                  alert('Error interno:' + jqXHR.resposeText);
              }
              else if(jqXHR.status === 404)
              {
                  alert('Pagina no encontrada[404]');
              }
              else if(exception === 'timeout')
              {
                  alert('Error time out');
              }
              else if(exception === 'abort')
              {
                  alert('Respuesta ajax abortada');
              }
              else
              {
                  alert('Error no detectado '+jqXHR.responseText);
              }
          });
      });
  </code></pre>
  
  <p>But It don´t go to the controller, don´t work, I received an Error 404 not found url</p>
  
  <p>My call to the Controller</p>
  
  <pre><code>Route::Controller('users','UsersController');
  </code></pre>
  
  <p>the controller UserSController code</p>
  
  <pre><code>class UsersController extends BaseController
  {
  
  //metodo para agregar al usuario
      public function postCreate()
      {
          //validamos reglas inputs
          $rules = array(
            'inputuser' =&gt; 'required|max:10',
            'inputpassword' =&gt; 'required|min:8',
            'inputpassword1' =&gt; 'required|min:8',
            'inputemail' =&gt; 'required|email|unique:users'
          );
  
          $validation = Validator::make(Input::all, $rules);
          //Si no pasa la validacion
          if($validation-&gt;fails())
          {
              return Redirect::back()-&gt;with_input()-&gt;with_errors($validation);
          }
          //Si todo ha ido bien guardamos
          $password = Input::post('inputpassword');
          $user = new User;
          $user-&gt;username = Input::post('inputuser');
          $user-&gt;password = Hash::make($password);
          $user-&gt;email = Input::post('inputemail');
          $user-&gt;admin = Input::post('es_admin');
  
          //guardamos
          $user-&gt;save();
  
          //redirigimos a usuarios
  
          return Redirect::to('admin/users.index')-&gt;with('status','ok_create');
  
      }
  }
  </code></pre>
  
  <p>What am I doing wrong?</p>