mhmiton / laravel-modules-livewire

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

Error when using rappasoft/laravel-livewire-tables #10

Closed lparede closed 3 years ago

lparede commented 3 years ago

@mhmiton , first of all, great work on this package!

I had problem when I start using the package rappasoft/laravel-livewire-tables.

The problem is that the component class is declared like this (DataTableComponent, not Component): class UsersTable extends DataTableComponent {

And in your service provider you are only accepting Component classes: ->filter(function ($class) { return is_subclass_of($class, Component::class) && ! (new ReflectionClass($class))->isAbstract(); })

To solve my problem, I extended this service provide and comment this code: is_subclass_of($class, Component::class) &&

Maybe you can check this, in order to improve this excellent package.

mhmiton commented 3 years ago

@lparede I checked with rappasoft/laravel-livewire-tables package. It's working for me. I didn't change anything. Are you getting any errors?

lparede commented 3 years ago

@mhmiton , you're absolutly right! There was another error causing this problem and I tought that it was caused by is_subclass_of() function.

My apologies.

You can close this thread.

mhmiton commented 3 years ago

Ok, thanks.