Hello, how to handle local scope when there are NO records? the builder returns an object, don't return null or empty collection for one on the controller/component side do some if condition to handle cases when there is or isn't records....currently in my component in the livewire mount I use a local scope that when there are records it works perfect but when there aren't it it crashes for that builder object (when no records).
Hello, how to handle local scope when there are NO records? the builder returns an object, don't return null or empty collection for one on the controller/component side do some if condition to handle cases when there is or isn't records....currently in my component in the livewire mount I use a local scope that when there are records it works perfect but when there aren't it it crashes for that builder object (when no records).
Very hard to answer without a specific code example and cases when it crashes or not. Needs debugging.