Commit f5d5c5a
[12.x] try another way to activate Broadcast routes (#57734)
* try another way to activate Broadcast routes
this command currently has 2 conditions it checks to try and activate the "channels" file in your `/bootstrap/app.php`. while this may cover a good chunk of users, it fails if the `commands:` named argument has been removed from the file.
this change adds an additional check to look for the `->withRouting()` method call, which has a *very* high likelyhood of being in the file. placing it after the "commands" named argument is ideal because it maintains named argument order, but this is a good fallback.
_if even this additional check fails_, it now returns an error message to the user telling them they need to manually activate the broadcast routes in their `/bootstrap/app.php` file. this will helpfully avoid confusion if the automatic enabling fails.
* Update BroadcastingInstallCommand.php
---------
Co-authored-by: Taylor Otwell <[email protected]>1 parent 5b3cc40 commit f5d5c5a
File tree
1 file changed
+8
-0
lines changed- src/Illuminate/Foundation/Console
1 file changed
+8
-0
lines changedLines changed: 8 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
161 | 161 | | |
162 | 162 | | |
163 | 163 | | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
164 | 172 | | |
165 | 173 | | |
166 | 174 | | |
| |||
0 commit comments