I've tried this link https://github.com/maddhatter/laravel-fullcalendar.
Below codes are taken from the above link:
1) In composer.json
"require": {"maddhatter/laravel-fullcalendar": "~1.0" }
2) In app.php
'providers' => [MaddHatter\LaravelFullcalendar\ServiceProvider::class,]
'aliases' => ['Calendar' => MaddHatter\LaravelFullcalendar\Facades\Calendar::class,]
3) In controller
use MaddHatter\LaravelFullcalendar\Facades\Calendar;
use MaddHatter\LaravelFullcalendar\Event;
use Illuminate\Database\Eloquent\Model;
class EventModel extends Eloquent implements \MaddHatter\LaravelFullcalendar\Event
{
protected $dates = ['start', 'end'];
/**
* Get the event's id number
*
* @return int
*/
public function getId() {
return $this->id;
}
/**
* Get the event's title
*
* @return string
*/
public function getTitle()
{
return $this->title;
}
/**
* Is it an all day event?
*
* @return bool
*/
public function isAllDay()
{
return (bool)$this->all_day;
}
/**
* Get the start time
*
* @return DateTime
*/
public function getStart()
{
return $this->start;
}
/**
* Get the end time
*
* @return DateTime
*/
public function getEnd()
{
return $this->end;
}
}
4) In view
<script src="//cdnjs.cloudflare.com/ajax/libs/jquery/2.1.3/jquery.min.js"></script>
<script src="//cdnjs.cloudflare.com/ajax/libs/moment.js/2.9.0/moment.min.js"></script>
<script src="//cdnjs.cloudflare.com/ajax/libs/fullcalendar/2.2.7/fullcalendar.min.js"></script>
<link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/fullcalendar/2.2.7/fullcalendar.min.css"/>
{!! $calendar->calendar() !!}
{!! $calendar->script() !!}
I've added the above codes, but i got the error below
FatalErrorException in ProviderRepository.php line 146: Class 'MaddHatter\LaravelFullcalendar\ServiceProvider' not found
Please give your idea for this laravel beginner.
via Geetha Lakshmi