title: Displaying events from a table to fullcalendar
body: <p>I am trying to implement an event calendar inside one of my vue components in Laravel but I am not able to display the events on the calendar from my SQL database. Although, I am able to view the columns of my table using my resource controller.
  Note:- I am using router-view to display all the content under the id content so there are no blade templates. 
  Any help please!!
  Thanks in advance.</p>
  
  <pre><code>Dashboard.vue
  &lt;template&gt;
  &lt;full-calendar :config='config'&gt;
  &lt;/full-calendar&gt;
  &lt;/template&gt;
  &lt;script&gt;
  export default{
   data() {
      return {
        config: {
          defaultView: "month"
        },
  methods:{
  loadEvents() {
        axios.get("api/event").then(({ data }) =&gt; (this.events = data));
      }
  },
  created(){
  this.loadEvents();
  }
  };
  &lt;/script&gt;
  </code></pre>
  
  <pre><code>Controller type:resource
  
  public function index()
      {
  
              $events = DB::table('events')-&gt;get();
              $event = [];
  
              foreach($events as $row){
                  $endDate = $row-&gt;end_date."24:00:00";
                  $event[] = \Calendar::event(
                      $row-&gt;event_title,
                      true,
                      new \DateTime($row-&gt;start_date),
                      new \DateTime($row-&gt;end_date),
                      $row-&gt;id,
                      [
                          'color'=&gt;$row-&gt;color,
                      ]
                      );
              }
              $calendar =  \Calendar::addEvents($event);
              return $events;
  
  
      }
  </code></pre>
  
  <pre><code>
  class CreateEventsTable extends Migration
  {
      /**
       * Run the migrations.
       *
       * @return void
       */
      public function up()
      {
          Schema::create('events', function (Blueprint $table) {
              $table-&gt;increments('id');
              $table-&gt;integer('user_id')-&gt;unsigned();
              $table-&gt;foreign('user_id')-&gt;references('id')-&gt;on('users');
              $table-&gt;string('event_title');
              $table-&gt;string('event_description');
              $table-&gt;string('color');
              $table-&gt;datetime('start_date');
              $table-&gt;datetime('end_date');
              $table-&gt;timestamps();
          });
      }
  };
  </code></pre>