/** * Create or find the given component. * * @param string $name * @return Component */ private function newComponent(string $name) { return Component::firstOrCreate(['name' => $name]); }