In the first part we sent iOS push notifications straight to Apple: a .p8 key, a cached JWT, one HTTP/2 request inside a queued job. It works, but every place that sends a push has to know about tokens, devices and that job.
Laravel already has a better shape for this. Mail, SMS and Slack all go through notifications, and push can too. By the end of this post, this is all it takes:
$user -> notify ( new OrderShipped ( $order ));
Enter fullscreen mode
Exit fullscreen mode
The notification lands on every iPhone the user is signed in on, a dead token cleans itself up, and a tap opens /orders/1234 . No Firebase, no package.…