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

problem with implicit plots with absolute functions

I’m transcribing code from Mathematica to Python (I’m using spyder). However, when plotting the graph, I can’t get the plot looking like this: The code produces: import numpy as np import sympy as sym nc=1.772 c=3e10 L=0.3 R=3.0 lbd=775e-7 d = sym.Symbol (‘d’) rep = sym.Symbol (‘rep’) M1=np.array([[1,(L/2)],[0,1]]) #espessura_cristal M2=np.array([[1,0],[0,(1/nc)]]) #ar_cristal M3=sym.Matrix ([[1,(d/2)-L/2],[0,1]]) #dis_cristal_esp #print…

Details