protected function createMissionRelation() { try { $mission = Mission::findOrFail(array_get($this->input, 'mission_id', null)); $this->object->mission()->associate($mission); } catch (ModelNotFoundException $e) { // Model not found, do not set } }