{"id":1784,"date":"2024-09-05T12:07:37","date_gmt":"2024-09-05T12:07:37","guid":{"rendered":"https:\/\/www.vibidsoft.com\/blog\/?p=1784"},"modified":"2026-11-24T07:36:06","modified_gmt":"2026-11-24T07:36:06","slug":"integrating-push-notifications-in-laravel-using-firebase","status":"publish","type":"post","link":"https:\/\/www.vibidsoft.com\/blog\/integrating-push-notifications-in-laravel-using-firebase\/","title":{"rendered":"Integrating Push Notifications in Laravel Using Firebase"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">Push notifications bring users back to your app with timely updates: new messages, order status, reminders or alerts. <strong>Firebase Cloud Messaging (FCM)<\/strong> is the most common way to deliver them to Android, iOS and web browsers, and Laravel&#8217;s notification system makes sending them clean and testable. This guide shows how to <strong>send push notifications from Laravel with Firebase<\/strong> using the current <strong>FCM HTTP v1 API<\/strong>, from Firebase setup to sending, client handling and production tips.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Important:<\/strong> Google shut down FCM&#8217;s legacy APIs (the &#8220;server key&#8221; approach) in 2024. If an older tutorial asks for <code>FIREBASE_SERVER_KEY<\/code>, it will no longer work. Use a service account and the HTTP v1 API as shown below.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"how-push-notifications-work-with-laravel-and-fcm\">How push notifications work with Laravel and FCM<\/h2>\n\n\n\n<ol class=\"wp-block-list\">\n<li>Your app (web, Android or iOS) asks the user for permission and gets an <strong>FCM registration token<\/strong> for that device.<\/li>\n\n\n<li>The app sends the token to your Laravel back end, which stores it against the user.<\/li>\n\n\n<li>When something happens (a new message, an order update), Laravel sends a message to FCM with the token.<\/li>\n\n\n<li>FCM delivers the notification to the device.<\/li>\n<\/ol>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"step-1-set-up-firebase\">Step 1: set up Firebase<\/h2>\n\n\n\n<ol class=\"wp-block-list\">\n<li>Create a project in the <strong>Firebase console<\/strong>.<\/li>\n\n\n<li>Add your apps (Web, Android and\/or iOS) to the project.<\/li>\n\n\n<li>For web push, generate a <strong>Web Push certificate (VAPID key)<\/strong> under Project settings \u2192 Cloud Messaging.<\/li>\n\n\n<li>For iOS, upload your <strong>APNs authentication key<\/strong> so FCM can deliver to Apple devices.<\/li>\n\n\n<li>Under Project settings \u2192 Service accounts, <strong>generate a new private key<\/strong>. This JSON file lets your server authenticate with FCM. Store it outside your web root and never commit it to Git.<\/li>\n<\/ol>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"step-2-install-the-packages\">Step 2: install the packages<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">The <code>laravel-notification-channels\/fcm<\/code> package adds an FCM channel to Laravel notifications and uses <code>kreait\/laravel-firebase<\/code> underneath:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>composer require laravel-notification-channels\/fcm<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Point Laravel to your service account file in <code>.env<\/code>:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>FIREBASE_CREDENTIALS=\/var\/www\/secure\/firebase-service-account.json<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Optionally publish the Firebase config to customise it:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>php artisan vendor:publish --provider=\"Kreait\\Laravel\\Firebase\\ServiceProvider\" --tag=config<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"step-3-store-device-tokens\">Step 3: store device tokens<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Add a column (or a separate table if users have several devices) and an endpoint the app calls after it receives a token:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>Schema::table('users', function (Blueprint $table) {\n    $table-&gt;string('fcm_token')-&gt;nullable();\n});<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code>Route::post('\/device-token', function (Request $request) {\n    $request-&gt;validate(['token' =&gt; 'required|string']);\n    $request-&gt;user()-&gt;update(['fcm_token' =&gt; $request-&gt;token]);\n    return response()-&gt;noContent();\n})-&gt;middleware('auth:sanctum');<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Tell Laravel which token to use for the notification channel:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>\/\/ app\/Models\/User.php\npublic function routeNotificationForFcm(): ?string\n{\n    return $this-&gt;fcm_token;\n}<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"step-4-create-the-notification\">Step 4: create the notification<\/h2>\n\n\n\n<pre class=\"wp-block-code\"><code>php artisan make:notification NewMessageNotification<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code>namespace App\\Notifications;\n\nuse Illuminate\\Bus\\Queueable;\nuse Illuminate\\Contracts\\Queue\\ShouldQueue;\nuse Illuminate\\Notifications\\Notification;\nuse NotificationChannels\\Fcm\\FcmChannel;\nuse NotificationChannels\\Fcm\\FcmMessage;\nuse NotificationChannels\\Fcm\\Resources\\Notification as FcmNotification;\n\nclass NewMessageNotification extends Notification implements ShouldQueue\n{\n    use Queueable;\n\n    public function __construct(private int $messageId, private string $sender) {}\n\n    public function via(object $notifiable): array\n    {\n        return [FcmChannel::class];\n    }\n\n    public function toFcm(object $notifiable): FcmMessage\n    {\n        return (new FcmMessage(notification: new FcmNotification(\n            title: 'New message',\n            body: \"{$this-&gt;sender} sent you a message\",\n        )))-&gt;data([\n            'message_id' =&gt; (string) $this-&gt;messageId,\n            'type' =&gt; 'chat',\n        ]);\n    }\n}<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Implementing <code>ShouldQueue<\/code> sends notifications through your queue, so web requests stay fast. Data values must be strings.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"step-5-send-the-notification\">Step 5: send the notification<\/h2>\n\n\n\n<pre class=\"wp-block-code\"><code>$recipient-&gt;notify(new NewMessageNotification($message-&gt;id, $sender-&gt;name));<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Check the package&#8217;s README for the version you install, as the message-builder API has changed between major versions.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"sending-directly-with-the-firebase-sdk\">Sending directly with the Firebase SDK<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">For broadcasts or topic messages you can use <code>kreait\/laravel-firebase<\/code> directly:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>use Kreait\\Firebase\\Messaging\\CloudMessage;\nuse Kreait\\Laravel\\Firebase\\Facades\\Firebase;\n\n$message = CloudMessage::withTarget('topic', 'promotions')\n    -&gt;withNotification(['title' =&gt; 'Weekend sale', 'body' =&gt; '20% off this weekend'])\n    -&gt;withData(['screen' =&gt; 'offers']);\n\nFirebase::messaging()-&gt;send($message);<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"step-6-receive-notifications-in-a-web-app\">Step 6: receive notifications in a web app<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Use the modular Firebase JavaScript SDK to request permission and get a token:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>import { initializeApp } from 'firebase\/app';\nimport { getMessaging, getToken, onMessage } from 'firebase\/messaging';\n\nconst app = initializeApp({ \/* your Firebase web config *\/ });\nconst messaging = getMessaging(app);\n\nconst token = await getToken(messaging, { vapidKey: 'YOUR_PUBLIC_VAPID_KEY' });\nawait fetch('\/device-token', {\n  method: 'POST',\n  headers: { 'Content-Type': 'application\/json' },\n  body: JSON.stringify({ token }),\n});\n\nonMessage(messaging, (payload) =&gt; {\n  \/\/ Show an in-app toast while the page is open\n  console.log('Message received', payload);\n});<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Add a <code>firebase-messaging-sw.js<\/code> service worker at your site root to handle notifications when the page is in the background, following the Firebase documentation for your SDK version.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"receiving-notifications-in-mobile-apps\">Receiving notifications in mobile apps<\/h2>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Flutter:<\/strong> use the <code>firebase_messaging<\/code> plugin to request permission, get the token and handle foreground, background and tapped notifications.<\/li>\n\n\n<li><strong>Android (Kotlin):<\/strong> add Firebase Messaging, extend <code>FirebaseMessagingService<\/code> and handle <code>onNewToken<\/code> and <code>onMessageReceived<\/code>. Android 13+ requires the runtime notification permission.<\/li>\n\n\n<li><strong>iOS (Swift):<\/strong> enable push notifications and background modes, upload your APNs key to Firebase and request authorisation from the user.<\/li>\n\n\n<li><strong>React Native:<\/strong> use React Native Firebase messaging.<\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"production-best-practices\">Production best practices<\/h2>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Handle invalid tokens:<\/strong> remove tokens that FCM reports as unregistered or invalid.<\/li>\n\n\n<li><strong>Support multiple devices<\/strong> per user with a <code>device_tokens<\/code> table and send to each.<\/li>\n\n\n<li><strong>Use queues and retries<\/strong> so spikes in notifications do not slow your app.<\/li>\n\n\n<li><strong>Use topics<\/strong> for broadcasts instead of looping over thousands of tokens.<\/li>\n\n\n<li><strong>Respect users:<\/strong> ask permission at a meaningful moment, let users choose notification types, and avoid sending too many.<\/li>\n\n\n<li><strong>Secure credentials:<\/strong> keep the service account file out of version control and restrict its permissions.<\/li>\n\n\n<li><strong>Measure engagement:<\/strong> track deliveries, opens and conversions.<\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"frequently-asked-questions\">Frequently asked questions<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Does the Firebase server key still work?<\/strong> No. FCM&#8217;s legacy APIs were shut down in 2024. Use the HTTP v1 API with a service account.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Which Laravel package should I use for Firebase push notifications?<\/strong> <code>laravel-notification-channels\/fcm<\/code> for Laravel notifications, built on <code>kreait\/laravel-firebase<\/code>, which you can also use directly.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Can I send push notifications to iOS with Firebase?<\/strong> Yes. Upload your APNs key to Firebase and FCM delivers notifications to iOS devices.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>How do I send a notification to many users at once?<\/strong> Subscribe devices to a topic and send one message to the topic, or send in batches through a queue.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Do web push notifications work on iPhone?<\/strong> Yes, for web apps added to the home screen on supported iOS versions, using the standard Web Push permission flow.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"need-push-notifications-in-your-app\">Need push notifications in your app?<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Vibidsoft builds Laravel back ends and mobile apps with notifications, real-time features and integrations. See our <a href=\"https:\/\/www.vibidsoft.com\/laravel-development\">Laravel development services<\/a> and <a href=\"https:\/\/www.vibidsoft.com\/mobile-development\">mobile app development<\/a>, or <a href=\"https:\/\/www.vibidsoft.com\/contact\">contact us<\/a>.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Push notifications bring users back to your app with timely updates: new messages, order status, reminders or alerts. Firebase Cloud Messaging (FCM) is the\u2026<\/p>\n","protected":false},"author":7,"featured_media":3335,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"vs_takeaways":"","footnotes":""},"categories":[90,103],"tags":[2426,2425,2420,2429,2428,2416,2422,2419,2417,2421,2424,2415,2423,2427,2418],"class_list":["post-1784","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-laravel","category-php","tag-fcm-in-laravel","tag-firebase-cloud-messaging","tag-firebase-integration","tag-firebase-push-notifications","tag-firebase-sdk","tag-firebase-setup","tag-laravel-firebase-configuration","tag-laravel-notification-class","tag-laravel-notifications","tag-laravel-push-notifications","tag-mobile-push-notifications","tag-push-notification-tutorial","tag-push-notifications","tag-real-time-notifications","tag-web-push-notifications"],"aioseo_notices":[],"aioseo_head":"\n\t\t<!-- All in One SEO 5.0.5.1 - aioseo.com -->\n\t<meta name=\"description\" content=\"Send Laravel push notifications with Firebase Cloud Messaging and the HTTP v1 API: Firebase setup, device tokens, notification classes and clients.\" \/>\n\t<meta name=\"robots\" content=\"max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n\t<meta name=\"author\" content=\"Vibidsoft Engineering Team\"\/>\n\t<meta name=\"p:domain_verify\" content=\"147eaec3c09ba1af5e17b00fa12931da\" \/>\n\t<meta name=\"yandex-verification\" content=\"71876bdda9be7264\" \/>\n\t<link rel=\"canonical\" href=\"https:\/\/www.vibidsoft.com\/blog\/integrating-push-notifications-in-laravel-using-firebase\/\" \/>\n\t\t<meta property=\"og:locale\" content=\"en_US\" \/>\n\t\t<meta property=\"og:site_name\" content=\"Vibidsoft | Website and Mobile Apps Development Company\" \/>\n\t\t<meta property=\"og:type\" content=\"article\" \/>\n\t\t<meta property=\"og:title\" content=\"Laravel Firebase Push Notifications (FCM HTTP v1 Guide)\" \/>\n\t\t<meta property=\"og:description\" content=\"Send Laravel push notifications with Firebase Cloud Messaging and the HTTP v1 API: Firebase setup, device tokens, notification classes and clients.\" \/>\n\t\t<meta property=\"og:url\" content=\"https:\/\/www.vibidsoft.com\/blog\/integrating-push-notifications-in-laravel-using-firebase\/\" \/>\n\t\t<meta property=\"article:published_time\" content=\"2024-09-05T12:07:37+00:00\" \/>\n\t\t<meta property=\"article:modified_time\" content=\"2026-11-24T07:36:06+00:00\" \/>\n\t\t<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/vibidsoft\" \/>\n\t\t<meta property=\"og:image\" content=\"https:\/\/www.vibidsoft.com\/blog\/wp-content\/uploads\/2026\/11\/vibidsoft-blog-1784.jpg\" \/>\n\t\t<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n\t\t<meta name=\"twitter:site\" content=\"@vibidsoft\" \/>\n\t\t<meta name=\"twitter:title\" content=\"Laravel Firebase Push Notifications (FCM HTTP v1 Guide)\" \/>\n\t\t<meta name=\"twitter:description\" content=\"Send Laravel push notifications with Firebase Cloud Messaging and the HTTP v1 API: Firebase setup, device tokens, notification classes and clients.\" \/>\n\t\t<meta name=\"twitter:creator\" content=\"@vibidsoft\" \/>\n\t\t<meta name=\"twitter:image\" content=\"https:\/\/www.vibidsoft.com\/blog\/wp-content\/uploads\/2026\/11\/vibidsoft-blog-1784.jpg\" \/>\n\t\t<script type=\"application\/ld+json\" class=\"aioseo-schema\">\n\t\t\t{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/www.vibidsoft.com\\\/blog\\\/integrating-push-notifications-in-laravel-using-firebase\\\/#article\",\"name\":\"Laravel Firebase Push Notifications (FCM HTTP v1 Guide)\",\"headline\":\"Integrating Push Notifications in Laravel Using Firebase\",\"author\":{\"@id\":\"https:\\\/\\\/www.vibidsoft.com\\\/blog\\\/author\\\/vibidsoft-team\\\/#author\"},\"publisher\":{\"@id\":\"https:\\\/\\\/www.vibidsoft.com\\\/blog\\\/#organization\"},\"image\":{\"@type\":\"ImageObject\",\"url\":\"https:\\\/\\\/www.vibidsoft.com\\\/blog\\\/wp-content\\\/uploads\\\/2026\\\/11\\\/vibidsoft-blog-1784.jpg\",\"width\":1600,\"height\":900,\"caption\":\"Integrating Push Notifications in Laravel Using Firebase\"},\"datePublished\":\"2024-09-05T12:07:37+00:00\",\"dateModified\":\"2026-11-24T07:36:06+00:00\",\"inLanguage\":\"en-US\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.vibidsoft.com\\\/blog\\\/integrating-push-notifications-in-laravel-using-firebase\\\/#webpage\"},\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.vibidsoft.com\\\/blog\\\/integrating-push-notifications-in-laravel-using-firebase\\\/#webpage\"},\"articleSection\":\"Laravel, php, FCM in Laravel, Firebase Cloud Messaging, Firebase integration, Firebase push notifications, Firebase SDK, Firebase setup, Laravel Firebase configuration, Laravel notification class, Laravel notifications, Laravel push notifications, mobile push notifications, push notification tutorial, Push notifications, real-time notifications, web push notifications\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.vibidsoft.com\\\/blog\\\/integrating-push-notifications-in-laravel-using-firebase\\\/#breadcrumblist\",\"itemListElement\":[{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.vibidsoft.com\\\/blog\\\/#listItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/www.vibidsoft.com\\\/blog\\\/\",\"nextItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.vibidsoft.com\\\/blog\\\/category\\\/laravel\\\/#listItem\",\"name\":\"Laravel\"}},{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.vibidsoft.com\\\/blog\\\/category\\\/laravel\\\/#listItem\",\"position\":2,\"name\":\"Laravel\",\"item\":\"https:\\\/\\\/www.vibidsoft.com\\\/blog\\\/category\\\/laravel\\\/\",\"nextItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.vibidsoft.com\\\/blog\\\/integrating-push-notifications-in-laravel-using-firebase\\\/#listItem\",\"name\":\"Integrating Push Notifications in Laravel Using Firebase\"},\"previousItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.vibidsoft.com\\\/blog\\\/#listItem\",\"name\":\"Home\"}},{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.vibidsoft.com\\\/blog\\\/integrating-push-notifications-in-laravel-using-firebase\\\/#listItem\",\"position\":3,\"name\":\"Integrating Push Notifications in Laravel Using Firebase\",\"previousItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.vibidsoft.com\\\/blog\\\/category\\\/laravel\\\/#listItem\",\"name\":\"Laravel\"}}]},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/www.vibidsoft.com\\\/blog\\\/#organization\",\"name\":\"Vibidsoft\",\"description\":\"Website and Mobile Apps Development Company\",\"url\":\"https:\\\/\\\/www.vibidsoft.com\\\/blog\\\/\",\"sameAs\":[\"https:\\\/\\\/www.facebook.com\\\/vibidsoft\",\"https:\\\/\\\/twitter.com\\\/vibidsoft\",\"https:\\\/\\\/www.instagram.com\\\/vibidsoft\\\/\",\"https:\\\/\\\/www.linkedin.com\\\/company\\\/vibidsoft\\\/\"]},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/www.vibidsoft.com\\\/blog\\\/author\\\/vibidsoft-team\\\/#author\",\"url\":\"https:\\\/\\\/www.vibidsoft.com\\\/blog\\\/author\\\/vibidsoft-team\\\/\",\"name\":\"Vibidsoft Engineering Team\",\"image\":{\"@type\":\"ImageObject\",\"@id\":\"https:\\\/\\\/www.vibidsoft.com\\\/blog\\\/integrating-push-notifications-in-laravel-using-firebase\\\/#authorImage\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/6df7f13c10b7e5466e1dcc71176af8b348b8d528b2dabfd83312ca964f7806e9?s=96&d=mm&r=g\",\"width\":96,\"height\":96,\"caption\":\"Vibidsoft Engineering Team\"}},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.vibidsoft.com\\\/blog\\\/integrating-push-notifications-in-laravel-using-firebase\\\/#webpage\",\"url\":\"https:\\\/\\\/www.vibidsoft.com\\\/blog\\\/integrating-push-notifications-in-laravel-using-firebase\\\/\",\"name\":\"Laravel Firebase Push Notifications (FCM HTTP v1 Guide)\",\"description\":\"Send Laravel push notifications with Firebase Cloud Messaging and the HTTP v1 API: Firebase setup, device tokens, notification classes and clients.\",\"inLanguage\":\"en-US\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.vibidsoft.com\\\/blog\\\/#website\"},\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.vibidsoft.com\\\/blog\\\/integrating-push-notifications-in-laravel-using-firebase\\\/#breadcrumblist\"},\"author\":{\"@id\":\"https:\\\/\\\/www.vibidsoft.com\\\/blog\\\/author\\\/vibidsoft-team\\\/#author\"},\"creator\":{\"@id\":\"https:\\\/\\\/www.vibidsoft.com\\\/blog\\\/author\\\/vibidsoft-team\\\/#author\"},\"image\":{\"@type\":\"ImageObject\",\"url\":\"https:\\\/\\\/www.vibidsoft.com\\\/blog\\\/wp-content\\\/uploads\\\/2026\\\/11\\\/vibidsoft-blog-1784.jpg\",\"@id\":\"https:\\\/\\\/www.vibidsoft.com\\\/blog\\\/integrating-push-notifications-in-laravel-using-firebase\\\/#mainImage\",\"width\":1600,\"height\":900,\"caption\":\"Integrating Push Notifications in Laravel Using Firebase\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/www.vibidsoft.com\\\/blog\\\/integrating-push-notifications-in-laravel-using-firebase\\\/#mainImage\"},\"datePublished\":\"2024-09-05T12:07:37+00:00\",\"dateModified\":\"2026-11-24T07:36:06+00:00\"},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.vibidsoft.com\\\/blog\\\/#website\",\"url\":\"https:\\\/\\\/www.vibidsoft.com\\\/blog\\\/\",\"name\":\"Vibidsoft\",\"description\":\"Website and Mobile Apps Development Company\",\"inLanguage\":\"en-US\",\"publisher\":{\"@id\":\"https:\\\/\\\/www.vibidsoft.com\\\/blog\\\/#organization\"}}]}\n\t\t<\/script>\n\t\t<!-- All in One SEO -->\n\n","aioseo_head_json":{"title":"Laravel Firebase Push Notifications (FCM HTTP v1 Guide)","description":"Send Laravel push notifications with Firebase Cloud Messaging and the HTTP v1 API: Firebase setup, device tokens, notification classes and clients.","canonical_url":"https:\/\/www.vibidsoft.com\/blog\/integrating-push-notifications-in-laravel-using-firebase\/","robots":"max-snippet:-1, max-image-preview:large, max-video-preview:-1","keywords":"","webmasterTools":{"p:domain_verify":"147eaec3c09ba1af5e17b00fa12931da","yandex-verification":"71876bdda9be7264","miscellaneous":""},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.vibidsoft.com\/blog\/integrating-push-notifications-in-laravel-using-firebase\/#article","name":"Laravel Firebase Push Notifications (FCM HTTP v1 Guide)","headline":"Integrating Push Notifications in Laravel Using Firebase","author":{"@id":"https:\/\/www.vibidsoft.com\/blog\/author\/vibidsoft-team\/#author"},"publisher":{"@id":"https:\/\/www.vibidsoft.com\/blog\/#organization"},"image":{"@type":"ImageObject","url":"https:\/\/www.vibidsoft.com\/blog\/wp-content\/uploads\/2026\/11\/vibidsoft-blog-1784.jpg","width":1600,"height":900,"caption":"Integrating Push Notifications in Laravel Using Firebase"},"datePublished":"2024-09-05T12:07:37+00:00","dateModified":"2026-11-24T07:36:06+00:00","inLanguage":"en-US","mainEntityOfPage":{"@id":"https:\/\/www.vibidsoft.com\/blog\/integrating-push-notifications-in-laravel-using-firebase\/#webpage"},"isPartOf":{"@id":"https:\/\/www.vibidsoft.com\/blog\/integrating-push-notifications-in-laravel-using-firebase\/#webpage"},"articleSection":"Laravel, php, FCM in Laravel, Firebase Cloud Messaging, Firebase integration, Firebase push notifications, Firebase SDK, Firebase setup, Laravel Firebase configuration, Laravel notification class, Laravel notifications, Laravel push notifications, mobile push notifications, push notification tutorial, Push notifications, real-time notifications, web push notifications"},{"@type":"BreadcrumbList","@id":"https:\/\/www.vibidsoft.com\/blog\/integrating-push-notifications-in-laravel-using-firebase\/#breadcrumblist","itemListElement":[{"@type":"ListItem","@id":"https:\/\/www.vibidsoft.com\/blog\/#listItem","position":1,"name":"Home","item":"https:\/\/www.vibidsoft.com\/blog\/","nextItem":{"@type":"ListItem","@id":"https:\/\/www.vibidsoft.com\/blog\/category\/laravel\/#listItem","name":"Laravel"}},{"@type":"ListItem","@id":"https:\/\/www.vibidsoft.com\/blog\/category\/laravel\/#listItem","position":2,"name":"Laravel","item":"https:\/\/www.vibidsoft.com\/blog\/category\/laravel\/","nextItem":{"@type":"ListItem","@id":"https:\/\/www.vibidsoft.com\/blog\/integrating-push-notifications-in-laravel-using-firebase\/#listItem","name":"Integrating Push Notifications in Laravel Using Firebase"},"previousItem":{"@type":"ListItem","@id":"https:\/\/www.vibidsoft.com\/blog\/#listItem","name":"Home"}},{"@type":"ListItem","@id":"https:\/\/www.vibidsoft.com\/blog\/integrating-push-notifications-in-laravel-using-firebase\/#listItem","position":3,"name":"Integrating Push Notifications in Laravel Using Firebase","previousItem":{"@type":"ListItem","@id":"https:\/\/www.vibidsoft.com\/blog\/category\/laravel\/#listItem","name":"Laravel"}}]},{"@type":"Organization","@id":"https:\/\/www.vibidsoft.com\/blog\/#organization","name":"Vibidsoft","description":"Website and Mobile Apps Development Company","url":"https:\/\/www.vibidsoft.com\/blog\/","sameAs":["https:\/\/www.facebook.com\/vibidsoft","https:\/\/twitter.com\/vibidsoft","https:\/\/www.instagram.com\/vibidsoft\/","https:\/\/www.linkedin.com\/company\/vibidsoft\/"]},{"@type":"Person","@id":"https:\/\/www.vibidsoft.com\/blog\/author\/vibidsoft-team\/#author","url":"https:\/\/www.vibidsoft.com\/blog\/author\/vibidsoft-team\/","name":"Vibidsoft Engineering Team","image":{"@type":"ImageObject","@id":"https:\/\/www.vibidsoft.com\/blog\/integrating-push-notifications-in-laravel-using-firebase\/#authorImage","url":"https:\/\/secure.gravatar.com\/avatar\/6df7f13c10b7e5466e1dcc71176af8b348b8d528b2dabfd83312ca964f7806e9?s=96&d=mm&r=g","width":96,"height":96,"caption":"Vibidsoft Engineering Team"}},{"@type":"WebPage","@id":"https:\/\/www.vibidsoft.com\/blog\/integrating-push-notifications-in-laravel-using-firebase\/#webpage","url":"https:\/\/www.vibidsoft.com\/blog\/integrating-push-notifications-in-laravel-using-firebase\/","name":"Laravel Firebase Push Notifications (FCM HTTP v1 Guide)","description":"Send Laravel push notifications with Firebase Cloud Messaging and the HTTP v1 API: Firebase setup, device tokens, notification classes and clients.","inLanguage":"en-US","isPartOf":{"@id":"https:\/\/www.vibidsoft.com\/blog\/#website"},"breadcrumb":{"@id":"https:\/\/www.vibidsoft.com\/blog\/integrating-push-notifications-in-laravel-using-firebase\/#breadcrumblist"},"author":{"@id":"https:\/\/www.vibidsoft.com\/blog\/author\/vibidsoft-team\/#author"},"creator":{"@id":"https:\/\/www.vibidsoft.com\/blog\/author\/vibidsoft-team\/#author"},"image":{"@type":"ImageObject","url":"https:\/\/www.vibidsoft.com\/blog\/wp-content\/uploads\/2026\/11\/vibidsoft-blog-1784.jpg","@id":"https:\/\/www.vibidsoft.com\/blog\/integrating-push-notifications-in-laravel-using-firebase\/#mainImage","width":1600,"height":900,"caption":"Integrating Push Notifications in Laravel Using Firebase"},"primaryImageOfPage":{"@id":"https:\/\/www.vibidsoft.com\/blog\/integrating-push-notifications-in-laravel-using-firebase\/#mainImage"},"datePublished":"2024-09-05T12:07:37+00:00","dateModified":"2026-11-24T07:36:06+00:00"},{"@type":"WebSite","@id":"https:\/\/www.vibidsoft.com\/blog\/#website","url":"https:\/\/www.vibidsoft.com\/blog\/","name":"Vibidsoft","description":"Website and Mobile Apps Development Company","inLanguage":"en-US","publisher":{"@id":"https:\/\/www.vibidsoft.com\/blog\/#organization"}}]},"og:locale":"en_US","og:site_name":"Vibidsoft | Website and Mobile Apps Development Company","og:type":"article","og:title":"Laravel Firebase Push Notifications (FCM HTTP v1 Guide)","og:description":"Send Laravel push notifications with Firebase Cloud Messaging and the HTTP v1 API: Firebase setup, device tokens, notification classes and clients.","og:url":"https:\/\/www.vibidsoft.com\/blog\/integrating-push-notifications-in-laravel-using-firebase\/","article:published_time":"2024-09-05T12:07:37+00:00","article:modified_time":"2026-11-24T07:36:06+00:00","article:publisher":"https:\/\/www.facebook.com\/vibidsoft","og:image":"https:\/\/www.vibidsoft.com\/blog\/wp-content\/uploads\/2026\/11\/vibidsoft-blog-1784.jpg","twitter:card":"summary_large_image","twitter:site":"@vibidsoft","twitter:title":"Laravel Firebase Push Notifications (FCM HTTP v1 Guide)","twitter:description":"Send Laravel push notifications with Firebase Cloud Messaging and the HTTP v1 API: Firebase setup, device tokens, notification classes and clients.","twitter:creator":"@vibidsoft","twitter:image":"https:\/\/www.vibidsoft.com\/blog\/wp-content\/uploads\/2026\/11\/vibidsoft-blog-1784.jpg"},"aioseo_meta_data":{"post_id":"1784","title":"Laravel Firebase Push Notifications (FCM HTTP v1 Guide)","description":"Send Laravel push notifications with Firebase Cloud Messaging and the HTTP v1 API: Firebase setup, device tokens, notification classes and clients.","keywords":null,"keyphrases":{"focus":{"keyphrase":"Push Notifications","score":100,"analysis":{"keyphraseInTitle":{"score":9,"maxScore":9,"error":0},"keyphraseInDescription":{"score":9,"maxScore":9,"error":0},"keyphraseLength":{"score":9,"maxScore":9,"error":0,"length":2},"keyphraseInURL":{"score":5,"maxScore":5,"error":0},"keyphraseInIntroduction":{"score":9,"maxScore":9,"error":0},"keyphraseInSubHeadings":{"score":9,"maxScore":9,"error":0},"keyphraseInImageAlt":[]}},"additional":[]},"primary_term":null,"canonical_url":null,"og_title":null,"og_description":null,"og_object_type":"default","og_image_type":"default","og_image_url":null,"og_image_width":null,"og_image_height":null,"og_image_custom_url":null,"og_image_custom_fields":null,"og_video":"","og_custom_url":null,"og_article_section":null,"og_article_tags":null,"twitter_use_og":false,"twitter_card":"default","twitter_image_type":"default","twitter_image_url":null,"twitter_image_custom_url":null,"twitter_image_custom_fields":null,"twitter_title":null,"twitter_description":null,"schema":{"blockGraphs":[],"customGraphs":[],"default":{"data":{"Article":[],"Course":[],"Dataset":[],"FAQPage":[],"Movie":[],"Person":[],"Product":[],"ProductReview":[],"Car":[],"Recipe":[],"Service":[],"SoftwareApplication":[],"WebPage":[]},"graphName":"Article","isEnabled":true},"graphs":[]},"schema_type":"default","schema_type_options":null,"pillar_content":false,"robots_default":true,"robots_noindex":false,"robots_noarchive":false,"robots_nosnippet":false,"robots_nofollow":false,"robots_noimageindex":false,"robots_noodp":false,"robots_notranslate":false,"robots_max_snippet":"-1","robots_max_videopreview":"-1","robots_max_imagepreview":"large","priority":null,"frequency":"default","local_seo":null,"breadcrumb_settings":null,"limit_modified_date":false,"ai":{"faqs":[],"keyPoints":[],"schemas":[],"titles":[],"descriptions":[],"socialPosts":{"email":[],"linkedin":[],"twitter":[],"facebook":[],"instagram":[]}},"created":"2024-09-05 12:04:39","updated":"2026-11-24 11:30:02","focus_keyword":"Push Notifications","additional_keywords":null,"truseo_locale":null,"seo_analyzer_scan_date":null},"aioseo_breadcrumb":"<div class=\"aioseo-breadcrumbs\"><span class=\"aioseo-breadcrumb\">\n\t\t\t<a href=\"https:\/\/www.vibidsoft.com\/blog\/\" title=\"Home\">Home<\/a>\n\t\t<\/span><span class=\"aioseo-breadcrumb-separator\">\u00bb<\/span><span class=\"aioseo-breadcrumb\">\n\t\t\t<a href=\"https:\/\/www.vibidsoft.com\/blog\/category\/laravel\/\" title=\"Laravel\">Laravel<\/a>\n\t\t<\/span><span class=\"aioseo-breadcrumb-separator\">\u00bb<\/span><span class=\"aioseo-breadcrumb\">\n\t\t\tIntegrating Push Notifications in Laravel Using Firebase\n\t\t<\/span><\/div>","aioseo_breadcrumb_json":[{"label":"Home","link":"https:\/\/www.vibidsoft.com\/blog\/"},{"label":"Laravel","link":"https:\/\/www.vibidsoft.com\/blog\/category\/laravel\/"},{"label":"Integrating Push Notifications in Laravel Using Firebase","link":"https:\/\/www.vibidsoft.com\/blog\/integrating-push-notifications-in-laravel-using-firebase\/"}],"_links":{"self":[{"href":"https:\/\/www.vibidsoft.com\/blog\/wp-json\/wp\/v2\/posts\/1784","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.vibidsoft.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.vibidsoft.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.vibidsoft.com\/blog\/wp-json\/wp\/v2\/users\/7"}],"replies":[{"embeddable":true,"href":"https:\/\/www.vibidsoft.com\/blog\/wp-json\/wp\/v2\/comments?post=1784"}],"version-history":[{"count":3,"href":"https:\/\/www.vibidsoft.com\/blog\/wp-json\/wp\/v2\/posts\/1784\/revisions"}],"predecessor-version":[{"id":3034,"href":"https:\/\/www.vibidsoft.com\/blog\/wp-json\/wp\/v2\/posts\/1784\/revisions\/3034"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.vibidsoft.com\/blog\/wp-json\/wp\/v2\/media\/3335"}],"wp:attachment":[{"href":"https:\/\/www.vibidsoft.com\/blog\/wp-json\/wp\/v2\/media?parent=1784"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.vibidsoft.com\/blog\/wp-json\/wp\/v2\/categories?post=1784"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.vibidsoft.com\/blog\/wp-json\/wp\/v2\/tags?post=1784"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}