laravel-livewire-tables
laravel-livewire-tables copied to clipboard
Using $this when not in object context
For some reason if datatable is above simple table with links it throws this exception
https://flareapp.io/share/17D2EGvm
Commenting out
$bills->links()
or moving datatable below this code, solves and issue.
Changing pageName doesn't help
->paginate(12, ['*'], 'pg');
Not sure why you're trying to use $this in a blade, unless I've missed something!
If you've set the variable or method to public, then $this is not required and you can reference as you've done elsewhere in your code.
I don't use $this
in blade file. I just got error with that message, I'm using $bills
Apologies, I must have been half asleep.
Just to check, are you given the simple table a name for pagination purposes otherwise it'll be getting confused! e.g. return view('livewire.show-posts', [ 'posts' => $post->comments()->paginate(10, ['*'], 'commentsPage'), ]);
I tried this one, it didin't help
Can you paste your entire resources/views/bill/index.blade.php, or drop me a link to it, and I'll see if I can reproduce from my end.
I'm assuming you're not seeing any "multiple root elements detected" errors in the console, as this would potentially cause the issue if the DOM is broken.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.