I want to make a variable
{{ $countEvents }}
which can count the number of rows from table Events...Now I have 18 rows( https://i.sstatic.net/ZUJoY.jpg ), I want to use this variable to my view. How can I be able to count the number of rows?
I've tried this
$events = Event::count();
but I got all data with all columns from my database, not the number of it!
count()on the results then pass to the view