Notification before return

When i click a button,downloading notification should appear
public function product()
        {
            $this->validate();
            
            Notification::make()
                ->title('Downloading')
                ->body('Downloading Product Report')
                ->success()
                ->send();

after downloaded notification should appear
Notification::make()
                        ->success()
                        ->title('Download Complete')
                        ->body('Product Report Downloaded')
                        ->send()

but both these notifications are sent after the function return. Is there any way to show the notification before return
Was this page helpful?