Check out example codes for "Display Popular Posts laravel". It will help you in understanding the concepts better.

Code Example 1

$trending = app('App\Services\Trending')->week();

Learn ReactJs, React Native from akashmittal.com