dongtuo2373 2019-03-28 10:09
浏览 155

如何在数据库Laravel中显示日历视图中的日期

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'); 
    } 
}
  • 写回答

0条回答 默认 最新

    报告相同问题?

    悬赏问题

    • ¥50 comsol稳态求解器 找不到解,奇异矩阵有1个空方程返回的解不收敛。没有返回所有参数步长;pid控制
    • ¥15 怎么让wx群机器人发送音乐
    • ¥15 fesafe材料库问题
    • ¥35 beats蓝牙耳机怎么查看日志
    • ¥15 Fluent齿轮搅油
    • ¥15 八爪鱼爬数据为什么自己停了
    • ¥15 交替优化波束形成和ris反射角使保密速率最大化
    • ¥15 树莓派与pix飞控通信
    • ¥15 自动转发微信群信息到另外一个微信群
    • ¥15 outlook无法配置成功