Need help to understand why sometimes the data of my table is lost after a function and I need to force query again the posts #345
-
Beta Was this translation helpful? Give feedback.
Replies: 3 comments
-
@joffreypersia Have you tried converting your If you remove the
then, edit your blade view and change any PS I think you have a typo in your blade view, the 2nd
|
Beta Was this translation helpful? Give feedback.
-
Some suggestions: |
Beta Was this translation helpful? Give feedback.
-
Thank you @hugoaf and @jeffchown, indeed making $Users a computed property allowed me to now remove the @hugoaf, thank you for your recommandations, I use a child livewire component because I have many actions inside (switch to the user, edit him...etc). I just remove the unnecessary stuff for better lisibility ! @jeffchown nice catch on the tag :) Thank you again |
Beta Was this translation helpful? Give feedback.
@joffreypersia Have you tried converting your
$users
to a computed property?If you remove the
public $users
property, then add the method:then, edit your blade view and change any
$users
to$this->users
, it will use the computed property and return the results of the query each time the blade view is rendered.PS I think you have a typo in your blade view, the 2nd
<flux:cell>
looks like it doesn't have an opening<a>
: