Last active
September 7, 2021 13:46
-
-
Save Ghostscypher/4731ce8dc884228afec7ae008c8dabd4 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<script> | |
const public_channel = '{{config('app.name')}}.Public'; | |
Echo.channel(public_channel) | |
.listen('OrderShipmentStatusUpdated', (data) => { | |
console.log(data) | |
}); | |
</script> | |
@logged_in | |
<script> | |
const private_channel = '{{config('app.name')}}.{{auth()->user()->id}}'; | |
Echo.private(private_channel) | |
.notification((notification) => { | |
console.log(notification); | |
}); | |
</script> | |
@endlogged_in |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment