简体   繁体   中英

Show countif mysql query table to html

I have a countif query in mysql and I would like to show the table on my html. I'm currently using laravel 6.0 framework.

Here is the picture of the table i want to show:

这是我想展示的桌子图片

Here is my code in html:

这是我的 html 代码

Here is my code in the controller:

这是我在控制器中的代码

There should be numerous errors with index function in your controller. Specifically with how you are trying to assign $count a value. Read these: Eloquent Methods all() vs get() , Eloquent Selects , Eloquent Ordering, Grouping, Limit and Offset , Eloquent Where .

Laravel has an excellent documentation, if you were to follow it - working with Laravel would become much easier.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM