Skip to content

Commit 9472d54

Browse files
committed
support callables in broadcast if
1 parent 80771f5 commit 9472d54

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/Illuminate/Foundation/helpers.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -237,7 +237,7 @@ function broadcast($event = null)
237237
function broadcast_if($boolean, $event = null)
238238
{
239239
if ($boolean) {
240-
return app(BroadcastFactory::class)->event($event);
240+
return app(BroadcastFactory::class)->event(value($event));
241241
} else {
242242
return new FakePendingBroadcast;
243243
}
@@ -255,7 +255,7 @@ function broadcast_if($boolean, $event = null)
255255
function broadcast_unless($boolean, $event = null)
256256
{
257257
if (! $boolean) {
258-
return app(BroadcastFactory::class)->event($event);
258+
return app(BroadcastFactory::class)->event(value($event));
259259
} else {
260260
return new FakePendingBroadcast;
261261
}

0 commit comments

Comments
 (0)