I have leave application, I need if user with level manager can view who's leave in calendar mode:
Here's the user table
id | nama | email | level
1 Johan johan.com user
2 Michael michael.com manager
3 Lorem lorem.com supervisor
4 Ipsum ipsum.com user
5 Dolor dolor.com user
Here's the leave table
id | nama | email | leave_start | leave_end
1 Johan johan.com 2019-04-01 2019-04-05
5 Dolor dolor.com 2019-04-08 2019-04-12
So the manager can view all data from leave table to see who's on leave. I have tried using fullcalendar following a tutorial but it's still getting an error to view the calendar. The error is:
Argument 2 passed to Symfony\Component\HttpFoundation\RedirectResponse::__construct() must be of the type integer, array given called in C:\x\htdocs\leave\vendor\laravel\framework\src\Illuminate\Routing\Redirector.php on line 203
How I can fix these and show the data in calendar mode?
Here is code from the error on redirectresponse.php
public function __construct(?string $url, int $status = 302, array $headers = [])
{
parent::__construct('', $status, $headers);
$this->setTargetUrl($url);
if (!$this->isRedirect())
{
throw new \InvalidArgumentException(sprintf('The HTTP status code is not a redirect ("%s" given).', $status));
}
if (301 == $status && !array_key_exists('cache-control', $headers))
{
$this->headers->remove('cache-control');
}
}