1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-11-16 08:02:40 +01:00
invoiceninja/app/Http/Controllers/CalendarController.php
2017-09-12 17:16:18 +03:00

41 lines
873 B
PHP

<?php
namespace App\Http\Controllers;
use App\Jobs\GenerateCalendarEvents;
/**
* Class ReportController.
*/
class CalendarController extends BaseController
{
/**
* @return \Illuminate\Contracts\View\View
*/
public function showCalendar()
{
if (! auth()->user()->hasPermission('view_all')) {
return redirect('/');
}
$data = [
//'showBreadcrumbs' => false,
];
return view('calendar', $data);
}
public function loadEvents()
{
$events = dispatch(new GenerateCalendarEvents());
//dd($events);
\Log::info(print_r(request()->input(), true));
//\Log::info(print_r($events, true));
//echo '[{"title": "Test Event", "start": "2017-09-14T16:00:00", "color": "green"}]';
//exit;
return response()->json($events);
}
}