title: Send Ajax data to Laravel controller
body: <p>I am using fullcalendar, I need need to create a new event when user clicks on a specific date, I am using Laravel controller to store the data send by ajax request. I can create an event on calendar, but I cant send the data to controller and moreover browser tab freezes after creating the event. Anyone can correct where I am wrong? or provide better solution to the problem.</p>
  
  <pre><code>select: function(start, end, allDay) {
  var title = event_name;// Event Title:
  var eventData;
  if (title) {
      eventData = { //creates a new event on the calendar 
          title: title,
          start: start,
          end: end,
          allDay: allDay
      };
      $('#calendar').fullCalendar('renderEvent', eventData, true); // stick? = true
  
      $.ajax({                        
          data:eventData,
          type: 'POST',
          url:"/projects/calendar/store", // your url
          beforeSend: function (request) {
              return request.setRequestHeader('X-CSRF-Token', $("meta[name='csrf-token']").attr('content'));
          },
          success: function(response) {
               console.log(response);
          }
      });
  }
  $('#calendar').fullCalendar('unselect');
  },
  </code></pre>
  
  <p>This is my Route file, I have tried both get and post but none is working.</p>
  
  <pre><code>Route::get('/projects/calendar/store','FrontEndController@calendarStore');
  </code></pre>
  
  <p>This is the Controller, it will only process data sent by ajax request but no view.</p>
  
  <pre><code>public function calendarStore(Request $request)   
  
  {
  $calendar = new Calendar;
  Input::all();
  
  $userId = Auth::user()-&gt;id;
  $event_title =$request-&gt;input('title');
  $start =$request-&gt;input('start');
  $end =$request-&gt;input('end');
  
  $calendar_event = Calendar::create([
      'user_id' =&gt; $userId, // I can get the user ID 
      'project_id' =&gt; 2,
      'event_title' =&gt; $event_title,
      'start_date' =&gt;$start,
      'end_date' =&gt; $end
  ]);
  }
  </code></pre>