File tree Expand file tree Collapse file tree 2 files changed +7
-1
lines changed
resources/views/livewire/pages/forum Expand file tree Collapse file tree 2 files changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -63,6 +63,12 @@ public function reloadThreads(?int $channelId): void
6363 $ this ->dispatch ('render ' );
6464 }
6565
66+ #[On('redirectToLogin ' )]
67+ public function redirectToLogin (): void
68+ {
69+ $ this ->redirectRoute ('login ' , navigate: true );
70+ }
71+
6672 protected function applySearch (Builder $ query ): Builder
6773 {
6874 if ($ this ->search ) {
Original file line number Diff line number Diff line change 22 <x-slot:buttons >
33 <x-buttons .primary
44 type =" button"
5- onclick =" Livewire.dispatch('openPanel', { component: 'components.slideovers.thread-form' })"
5+ onclick =" {{ Auth :: check () ? ' Livewire.dispatch(\ ' openPanel\ ' , { component: \ ' components.slideovers.thread-form\ ' })' : ' Livewire.dispatch( \' redirectToLogin \' ) ' } } "
66 class =" gap-2 w-full justify-center py-2.5"
77 >
88 {{ __ (' pages/forum.new_thread' ) } }
You can’t perform that action at this time.
0 commit comments