i was reading the cookbook about find orders which is 30 days ago or last month
$testing = $this->Orders->find('all') ->where(['Orders.created_at >' => new Date('-30 days')]) ->contain(['OrderProducts']) ->limit(10); $testing1 = $this->paginate($testing); $this->set(compact('testing', 'testing1'));
i am using
can anyone guide about how to find it in a correct way? i like to find orders based on last month.