过滤器laravel逻辑

 收藏

我在数据库中有3个用户,每个用户每天都有不同的状态。我希望每个用户水平填充1行表及其相关数据。 如下。

______________________________________________________
 no |   name  | march 1 | march 2 | march 3 |march 4 | -----and so on
______________________________________________________
  1 |   john  |    OK   |    NO   |    OK   |   OK
______________________________________________________
  2 |   marry |    OK   |    OK   |    OK   |   OK
______________________________________________________
  3 |   jack  |    NO   |    OK   |    OK   |   OK

到目前为止,我已经能够将数据从控制器传递到视图/刀片并创建表,如下所示

_

______________________________________
 no |   name  | created_at |  status  |
_______________________________________
  1 |   john  |   march 1  |    OK    |
_______________________________________
  2 |   marry |   march 1  |    OK    |
_______________________________________
  3 |   jack  |   march 1  |    NO    |
_______________________________________
  4 |   john  |   march 2  |    NO    |
_______________________________________
  5 |   marry |   march 2  |    OK    |
_______________________________________
  6 |   jack  |   march 2  |    OK    |
_______________________________________
  7 |   john  |   march 3  |    OK    |
_______________________________________
  8 |   marry |   march 3  |    OK    |
_______________________________________
  9 |   jack  |   march 3  |    OK    |

- - -等等

或者,如果有链接解决的问题与我的主题相同,那就太好了。谢谢

回复