Add Component Resolver for Modules
This commit is contained in:
		
							parent
							
								
									5165ad932b
								
							
						
					
					
						commit
						85800ae2b9
					
				|  | @ -35,6 +35,16 @@ class BaseServiceProvider extends ServiceProvider | ||||||
|             $self = $this; |             $self = $this; | ||||||
|             return $condition ? $self->merge([$key => $attributes]) : $self; |             return $condition ? $self->merge([$key => $attributes]) : $self; | ||||||
|         }); |         }); | ||||||
|  | 
 | ||||||
|  | 
 | ||||||
|  |         Livewire::resolveMissingComponent(function ($name) { | ||||||
|  |             'modules.dashboard.components.dashboard-component'; | ||||||
|  |             if (str($name)->startsWith('modules.')) { | ||||||
|  |                 return str($name)->explode('.')->map(fn ($name) => str($name)->studly()->toString())->implode('\\'); | ||||||
|  |             } | ||||||
|  | 
 | ||||||
|  |             return null; | ||||||
|  |         }); | ||||||
|     } |     } | ||||||
| 
 | 
 | ||||||
|     /** |     /** | ||||||
|  |  | ||||||
		Loading…
	
		Reference in New Issue