Laravel – carbon addDays()

Why is it not showing me anything on my blade when I add $date->addDays(5)? Here is my Controller: use Carbon\Carbon; … public function index(){ $date = Carbon::now(); $date->addDays(5); $date->format(“Y-m-d”); $posts = Post::where(‘status’,’=’, 1)->whereDate(‘created_at’,’=’, $date)->get(); return view(‘home’, compact(‘date’, $date))->with(‘posts’, $posts); } … And this is my home.blade.php: @extends(‘layouts.app’) @section(‘content’) <div class=”container”> <div class=”row justify-content-center”> <div class=”col-md-8″>…

Details

Calculating average leads created per month, across stores

I would like to calculate the average amount of leads (rows) created per month, across stores. Schema and Input: CREATE TABLE leads (`id` int, `store_id` int, `created_at` datetime) ; INSERT INTO leads (`id`, `store_id`, `created_at`) VALUES (5211, 1, ‘2019-09-13 23:29:29’), (5212, 1, ‘2019-08-13 21:29:29’), (5781, 1, ‘2019-08-16 21:29:29’), (3349, 5, ‘2019-10-16 23:29:29’), (3344, 5, ‘2019-10-16…

Details

SwiftyDropbox setup with Carthage

I’m following the steps to install SwiftyDropbox using Carthage. My Cartfile is: # SwiftyDropbox github “https://github.com/dropbox/SwiftyDropbox” ~> 5.1.0 When I run “carthage update –platform iOS” I get: third_party (master) $ carthage update –platform iOS *** Fetching SwiftyDropbox *** Fetching Alamofire *** Checking out Alamofire at “4.9.1” *** Checking out SwiftyDropbox at “5.1.0” *** xcodebuild output…

Details