Tuesday 17 July 2018

Webpush notifications for Laravel

Here the necessary steps in creating a webpush applications in LARAVEL. Add the library in your composer by checking this site.
In order for you to run this site, you must enforce https on your website by adding this line in you AppServiceProvider.php

    public function boot()
    {
        $this->app['request']->server->set('HTTPS', true);
    }
I wanted to use sqlite in heroku so I need to add the sqlite driver in composer.json then run 'composer update'.

    "require": {
        "php": ">=7.0.0",
        "fideloper/proxy": "~3.3",
        "laravel-notification-channels/webpush": "^3.0",
        "laravel/framework": "5.5.*",
        "laravel/tinker": "~1.0",
        "pusher/pusher-php-server": "^3.0",
        "ext-pdo_sqlite": "*"
    },
Share:

0 comments:

Post a Comment

Popular Posts

Recent Posts

Pages

Powered by Blogger.

About Me

My photo
For the past 10 years, I've been playing with codes using PHP, Java, Rails. I do this for a living and love new things to learn and the challenges that comes with it. Besides programming I love spending time with friends and family and can often be found together catching the latest movie or planning a trip to someplace I've never been before.