File tree Expand file tree Collapse file tree 4 files changed +72
-60
lines changed
Http/Livewire/Discussions Expand file tree Collapse file tree 4 files changed +72
-60
lines changed Original file line number Diff line number Diff line change @@ -51,11 +51,11 @@ public function saveComment(): void
5151 ->duration (5000 )
5252 ->send ();
5353
54- $ this ->reset ();
54+ $ this ->reset (' body ' );
5555 }
5656
5757 public function render (): View
5858 {
5959 return view ('livewire.discussions.add-comment ' );
6060 }
61- }
61+ }
Original file line number Diff line number Diff line change @@ -91,3 +91,16 @@ function route_to_reply_able(mixed $replyAble): string
9191 route ('discussions.show ' , $ replyAble ->slug ());
9292 }
9393}
94+
95+ if (! function_exists ('getAvatar ' )) {
96+ /**
97+ * @param $title
98+ * @param bool $rounded
99+ *
100+ * @return string
101+ */
102+ function getAvatar ($ title ,bool $ rounded =false ): string
103+ {
104+ return 'https://ui-avatars.com/api/?name= ' . urlencode ($ title ). '&background=random&bold=true&format=svg&size=512&rounded= ' .$ rounded ;
105+ }
106+ }
You can’t perform that action at this time.
0 commit comments