model = $model; } public function byIdGetModel($id) { Cache::remember(CacheMap::DB . "AdminMerchantRepository:byIdGetModel:" . $id, Carbon::now()->addHours(24), function () use ($id) { return $this->model->where('id', $id)->where('status', AdminMerchant::STATUS_OK)->first(); }); } }