title: Laravel Full Calendar
body: <p>I'm trying to follow this tutorial <a href="https://laravelcode.com/post/laravel-full-calendar-tutorial-example-using-maddhatter-laravel-fullcalendar" rel="nofollow noreferrer">https://laravelcode.com/post/laravel-full-calendar-tutorial-example-using-maddhatter-laravel-fullcalendar</a>. I completed every steps but the calendar still does not appear, only the Laravel header and the "Full Calendar Example" writing but not the calendar itself or if I remove "extends('layout.php')" nothing appears. :( What could be the problem? I hope someone can give a quick answer. Sorry if it's a bad question here.
  My code:</p>
  
  <p>config/app.php</p>
  
  <pre><code>'providers' =&gt; [
      .....
      .....
      MaddHatter\LaravelFullcalendar\ServiceProvider::class,
  ],
  'aliases' =&gt; [
      .....
      .....
      'Calendar' =&gt; MaddHatter\LaravelFullcalendar\Facades\Calendar::class,
  ]
  </code></pre>
  
  <p>database/migrations/CreateEventsTable</p>
  
  <pre><code>use Illuminate\Support\Facades\Schema;
  use Illuminate\Database\Schema\Blueprint;
  use Illuminate\Database\Migrations\Migration;
  class CreateEventsTable extends Migration
  {
      /**
       * Run the migrations.
       *
       * @return void
       */
      public function up()
      {
          Schema::create('events', function (Blueprint $table) {
              $table-&gt;increments('id');
              $table-&gt;string('title');
              $table-&gt;date('start_date');
              $table-&gt;date('end_date');
              $table-&gt;timestamps();
          });
      }
      /**
       * Reverse the migrations.
       *
       * @return void
       */
      public function down()
      {
          Schema::drop("events");
      }
  }
  </code></pre>
  
  <p>app/Event.php</p>
  
  <pre><code>namespace App;
  use Illuminate\Database\Eloquent\Model;
  
  class Event extends Model
  {
      protected $fillable = ['title','start_date','end_date'];
  }
  </code></pre>
  
  <p>database/seeds/AddDummyEvents.php</p>
  
  <pre><code>use Illuminate\Database\Seeder;
  use App\Event;
  
  class AddDummyEvent extends Seeder
  {
      public function run()
      {
          $data = [
              ['title'=&gt;'Demo Event-1', 'start_date'=&gt;'2017-09-11', 'end_date'=&gt;'2017-09-12'],
              ['title'=&gt;'Demo Event-2', 'start_date'=&gt;'2017-09-11', 'end_date'=&gt;'2017-09-13'],
              ['title'=&gt;'Demo Event-3', 'start_date'=&gt;'2017-09-14', 'end_date'=&gt;'2017-09-14'],
              ['title'=&gt;'Demo Event-3', 'start_date'=&gt;'2017-09-17', 'end_date'=&gt;'2017-09-17'],
          ];
          foreach ($data as $key =&gt; $value) {
              Event::create($value);
          }
      }
  }
  </code></pre>
  
  <p>routes/web.php</p>
  
  <pre><code>Route::get('/', function () {
      return view('welcome');
  });
  
  Auth::routes();
  
  Route::get('/home', 'HomeController@index')-&gt;name('home');
  Route::get('events', 'EventController@index');
  </code></pre>
  
  <p>app/Http/Controllers/EventController.php</p>
  
  <pre><code>namespace App\Http\Controllers;
  
  use Illuminate\Http\Request;
  use Calendar;
  use App\Event;
  
  class EventController extends Controller
  {
      public function index()
      {
          $events = [];
          $data = Event::all();
          if($data-&gt;count()) {
              foreach ($data as $key =&gt; $value) {
                  $events[] = Calendar::event(
                      $value-&gt;title,
                      true,
                      new \DateTime($value-&gt;start_date),
                      new \DateTime($value-&gt;end_date.' +1 day'),
                      null,
                      // Add color and link on event
                      [
                          'color' =&gt; '#f05050',
                          'url' =&gt; 'pass here url and any route',
                      ]
                  );
              }
          }
          $calendar = Calendar::addEvents($events);
          return view('fullcalendar', compact('calendar'));
      }
  }
  </code></pre>
  
  <p>resources/views/fullcalendar.blade.php</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-html lang-html prettyprint-override"><code>@extends('layouts.app')
  
  @section('style')
  &lt;link rel="stylesheet" type="text/css" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css"&gt;
  &lt;link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/fullcalendar/2.2.7/fullcalendar.min.css"/&gt;
  @endsection
  
  @section('content')
  &lt;div class="container"&gt;
      &lt;div class="row"&gt;
          &lt;div class="col-md-8 col-md-offset-2"&gt;
              &lt;div class="panel panel-default"&gt;
                  &lt;div class="panel-heading"&gt;Full Calendar Example&lt;/div&gt;
  
                  &lt;div class="panel-body"&gt;
                      {!! $calendar-&gt;calendar() !!}
                  &lt;/div&gt;
              &lt;/div&gt;
          &lt;/div&gt;
      &lt;/div&gt;
  &lt;/div&gt;
  @endsection
  
  @section('script')
  &lt;script src="https://cdnjs.cloudflare.com/ajax/libs/moment.js/2.9.0/moment.min.js"&gt;&lt;/script&gt;
  &lt;script src="https://cdnjs.cloudflare.com/ajax/libs/fullcalendar/2.2.7/fullcalendar.min.js"&gt;&lt;/script&gt;
  {!! $calendar-&gt;script() !!}
  @endsection</code></pre>
  </div>
  </div>
  </p>