mhmiton / laravel-modules-livewire

Using Laravel Livewire in Laravel Modules package with automatically registered livewire components for every modules.
MIT License
179 stars 33 forks source link

Update modules-livewire.php #35

Closed solomon-ochepa closed 8 months ago

solomon-ochepa commented 8 months ago

Update to match the current Laravel structure.

mhmiton commented 8 months ago

@solomon-ochepa Thanks for your PR. You suggest the livewire namespace will be "App\Livewire" for the modules, So, should create the "App" folder on every module directory. But, according to the module structure, there is no "App" folder for Entities, Http, Console files. So, for the livewire components, only "Livewire" namespace will be good, I think.

solomon-ochepa commented 8 months ago

@solomon-ochepa Thanks for your PR. You suggest the livewire namespace will be "App\Livewire" for the modules, So, should create the "App" folder on every module directory. But, according to the module structure, there is no "App" folder for Entities, Http, Console files. So, for the livewire components, only "Livewire" namespace will be good, I think.

That's not true. As of Laravel 9.x, the path to the Livewire was app/Http/Livewire & namespace was App\Http\Livewire, in Laravel 10.30.x or so, the path and namespace was changed to app/Livewire & App\Livewire for the namespace respectively.

Did you confirm with the official documentation before making your review at all? I doubt you do.

Check this out Create a Livewire component

Screenshot_20231118-182820.png