request = $request; } public function execute() : CreateCostUnitResponse { $response = new CreateCostUnitResponse(); $costUnit = CostUnit::create([ 'name' => $this->request->name, 'tenant' => app('tenant')->slug, 'type' => $this->request->type, 'billing_deadline' => $this->request->billingDeadline, 'distance_allowance' => $this->request->distanceAllowance->getAmount(), 'mail_on_new' => $this->request->mailOnNew, 'allow_new' => true, 'archived' => false, ]); return $response; } }