-
Notifications
You must be signed in to change notification settings - Fork 17
Fix post views bugs #167
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix post views bugs #167
Changes from all commits
8a9ae6e
5858a64
38b996e
002b161
a8324e2
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -51,11 +51,11 @@ public function saveComment(): void | |
| ->duration(5000) | ||
| ->send(); | ||
|
|
||
| $this->reset(); | ||
| $this->reset('body'); | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. C'est la même chose. Le reset réinitialise toutes les variables du formulaire |
||
| } | ||
|
|
||
| public function render(): View | ||
| { | ||
| return view('livewire.discussions.add-comment'); | ||
| } | ||
| } | ||
| } | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @jiordiviera ce que je dis souvent c'est que si un fichier n'entre pas dasn le scope de ta tache faudrait éviter de les modifier. Parce que tu modifies ce fichier pourtant ta feature n'a pas besoin de le faire. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Que résoud cette action et quel comportement tu reçois et comment devrait-il normalement se comporter
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
views($article)->record();la première ligne comptabilise chaque vue sans restriction, tandis que
views($article)->cooldown(now()->addHours(2))->record();impose une attente de 2 heures entre les enregistrements de vues pour le même article.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Si 50 personnes regardent l'article au bout de 10 minutes il n'enregistre pas les 50 records ? Ou tu dis qu'il va enregistrer les 50 records après 2h
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Non c'est pour dire que un utilisateur ne pourrait voir le post deux fois de suite, genre sa vue sera mis en cache de tel sorte que si il voit un poste, en actualisant le navigateur, on considérera que il a déjà vu le post , la le nombre de vue ne sera pas incrémenté cela pendant les deux prochaines heures. donc la vue de post par cette utilisateur sera gelée.