Skip to content

Commit

Permalink
README &B composer.json
Browse files Browse the repository at this point in the history
  • Loading branch information
Elkasovic Nermin committed Mar 29, 2020
1 parent 40503b8 commit c76f41c
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
"autoload": {
"psr-4": {
"App\\": "app/",
"LaravelFullcalendar\\": "src/"
"LaravelFullCalendar\\": "src/"
}
},
"extra": {
Expand Down
16 changes: 8 additions & 8 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,13 @@ Or add the following to your composer.json's require section and `composer updat
Register the service provider in your `app.php` config file:

```php
Qlick\LaravelFullcalendar\ServiceProvider::class,
LaravelFullCalendar\ServiceProvider::class,
```

And optionally create an alias:

```php
'Calendar' => Qlick\LaravelFullcalendar\Facades\Calendar::class,
'Calendar' => LaravelFullCalendar\Facades\Calendar::class,

```

Expand Down Expand Up @@ -57,10 +57,10 @@ $event = \Calendar::event(
```
#### Implementing `Event` Interface

Alternatively, you can use an existing class and have it implement `Qlick\LaravelFullcalendar\Event`. An example of an Eloquent model that implements the `Event` interface:
Alternatively, you can use an existing class and have it implement `LaravelFullCalendar\Event`. An example of an Eloquent model that implements the `Event` interface:

```php
class EventModel extends Eloquent implements \Qlick\LaravelFullcalendar\Event
class EventModel extends Eloquent implements \LaravelFullCalendar\Event
{

protected $dates = ['start', 'end'];
Expand Down Expand Up @@ -118,10 +118,10 @@ class EventModel extends Eloquent implements \Qlick\LaravelFullcalendar\Event

#### `IdentifiableEvent` Interface

If you wish for your existing class to have event IDs, implement `\Qlick\LaravelFullcalendar\IdentifiableEvent` instead. This interface extends `\Qlick\LaravelFullcalendar\Event` to add a `getId()` method:
If you wish for your existing class to have event IDs, implement `\LaravelFullcalendar\IdentifiableEvent` instead. This interface extends `\LaravelFullcalendar\Event` to add a `getId()` method:

```php
class EventModel extends Eloquent implements \Qlick\LaravelFullcalendar\IdentifiableEvent
class EventModel extends Eloquent implements \LaravelFullcalendar\IdentifiableEvent
{

// Implement all Event methods ...
Expand Down Expand Up @@ -164,7 +164,7 @@ $event = \Calendar::event(

```php
<?php
class CalendarEvent extends \Illuminate\Database\Eloquent\Model implements \Qlick\LaravelFullcalendar\Event
class CalendarEvent extends \Illuminate\Database\Eloquent\Model implements \LaravelFullcalendar\Event
{
//...

Expand Down Expand Up @@ -210,7 +210,7 @@ $events[] = \Calendar::event(
'stringEventId' //optionally, you can specify an event ID
);

$eloquentEvent = EventModel::first(); //EventModel implements Qlick\LaravelFullcalendar\Event
$eloquentEvent = EventModel::first(); //EventModel implements LaravelFullcalendar\Event

$calendar = \Calendar::addEvents($events) //add an array with addEvents
->addEvent($eloquentEvent, [ //set custom color fo this event
Expand Down

0 comments on commit c76f41c

Please sign in to comment.