0👍
I found the solution. The reson behind it was the variable name. In url endpoint the variable name was decleared as dailyrevenue
and in the method as $revenue
.
You can find your url variable by typing php artisan route:list
.
I found that the url variable name must match with variable name in method.
Hope this helps others too.
Source:stackexchange.com