Skip to content

Instantly share code, notes, and snippets.

View qduc's full-sized avatar

Duc Nguyen qduc

View GitHub Profile
@qduc
qduc / fcm_send.php
Last active March 15, 2020 16:47
Send message to Firebase Cloud Messaging
<?php
$client = new \Google_Client();
$client->useApplicationDefaultCredentials(); // Secret key path. See https://github.com/googleapis/google-api-php-client#authentication-with-service-accounts
$client->addScope(\Google_Service_FirebaseCloudMessaging::CLOUD_PLATFORM);
// Your Firebase project ID
$projectId = "--Insert your project id--";
$fcm = new \Google_Service_FirebaseCloudMessaging($client);
@qduc
qduc / my.ini
Created August 5, 2018 08:43
PDOException::("SQLSTATE[HY000]: General error: 1709 Index column size too large. The maximum column size is 767 bytes.")
#https://stackoverflow.com/questions/43153719/laravel-5-4-migrate-key-is-too-long-error
innodb_large_prefix=on
innodb_file_format=barracuda
innodb_default_row_format=dynamic