0

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 the picture of the table i want to show

Here is my code in html:

Here is my code in html

Here is my code in the controller:

Here is my code in the controller

GMB
  • 216,147
  • 25
  • 84
  • 135
  • 2
    Please post your code as text instead of images. Also, please describe the problem that you are facing: what is wrong with the result that you are getting with your current code? – GMB Dec 03 '19 at 00:16
  • So I am having this error "Cannot use object of type stdClass as array ". I just want to show the table on my website. Can you show me other ways to do it on laravel? Thanks a lot. – Pfabian Dec 03 '19 at 00:38

1 Answers1

0

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.

KiprasT
  • 370
  • 5
  • 14