maddhatter / laravel-fullcalendar

Laravel FullCalendar.io Helper
627 stars 267 forks source link

Twig view #150

Closed Malkom closed 5 years ago

Malkom commented 5 years ago

Hi,

Is there a way to render a twig view of this calendar package, instead of a ##blade view ?

Malkom commented 5 years ago

I've find the solution :

{{ calendar|raw }} {{ script|raw }}

But the calendar doesn't appear...

Malkom commented 5 years ago

So the right way to tranform blade view :

{!! $calendar->calendar() !!} {!! $calendar->script() !!}

in twig view is :

{{ calendar.calendar()|raw }} {{ calendar.script()|raw }}

where calendar is you variable in your controller :

$calendar = Calendar::addEvents($event_list);

Hope this help someone ;)