Send push notification to Android, with laravel-push-notification
<p>A laravel-push-notification addon for laravel 5: <a href="https://github.com/davibennun/laravel-push-notification" rel="nofollow noreferrer">https://github.com/davibennun/laravel-push-notification</a></p>

<p>In my routes.php, I have:</p>

<blockquote>
  <p>Route::get('/test_gcm', 'TestGCMController@index');</p>
</blockquote>

<p>TestGCMController:
    

<pre><code>namespace App\Http\Controllers;

use Illuminate\Http\Request;
use Davibennun\LaravelPushNotification\Facades\PushNotification;

use App\Http\Requests;

class TestGCMController extends Controller
{
  public function index()
  {
    // Change it when device launching sometimes
    $deviceToken = "12345";

    $return = PushNotification::app('appNameAndroid')
      -&gt;to($deviceToken)
      -&gt;send('Hello World, i`m a push message');

    var_dump($return);
  }
}
</code></pre>

<p>so when I visit site.com/test_gcm</p>

<p>The var_dump returns:
<a href="https://i.stack.imgur.com/4uLJZ.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/4uLJZ.png" alt="enter image description here"></a></p>

<p>I am not sure it is successfully or failure. There is no indication in the image.</p>

<p>The android app is from this tutorial: <a href="http://www.androidhive.info/2016/02/android-push-notifications-using-gcm-php-mysql-realtime-chat-app-part-1/" rel="nofollow noreferrer">http://www.androidhive.info/2016/02/android-push-notifications-using-gcm-php-mysql-realtime-chat-app-part-1/</a>, I am able to get the GCM token, so the app is not working, but I don't receive any notification from the Android phone in emulator.</p>