File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed
Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -154,7 +154,11 @@ private static function syncExcel(SyncExcel $exporter): self
154154 'total ' => 0 ,
155155 ]);
156156
157- $ export ->createdBy ->notify ((new ExportStarted ($ export ->name ))
157+ $ notifiables = method_exists ($ exporter , 'notifiables ' )
158+ ? $ exporter ->notifiables ($ export )
159+ : Collection::wrap ($ export ->createdBy );
160+
161+ $ notifiables ->each ->notify ((new ExportStarted ($ export ->name ))
158162 ->onQueue ('notifications ' ));
159163
160164 $ count = Collection::wrap ($ exporter ->sheets ())
@@ -182,7 +186,7 @@ private static function syncExcel(SyncExcel $exporter): self
182186 ? $ exporter ->emailSubject ($ export )
183187 : __ (':name export done ' , ['name ' => $ export ->name ]);
184188
185- $ export -> createdBy ->notify ((new ExportDone ($ export , $ subject ))
189+ $ notifiables -> each ->notify ((new ExportDone ($ export , $ subject ))
186190 ->onQueue ('notifications ' ));
187191
188192 return $ export ;
You can’t perform that action at this time.
0 commit comments