PHP code example of joecampo / laravel-notification-basecamp

1. Go to this page and download the library: Download joecampo/laravel-notification-basecamp library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

joecampo / laravel-notification-basecamp example snippets


use Illuminate\Notifications\Notification;
use NotificationChannels\Basecamp\CampfireChannel;
use NotificationChannels\Basecamp\CampfireMessage;


class ReviewCreated extends Notification
{
    public function via($notifiable)
    {
        return [CampfireChannel::class];
    }

    public function toCampfire($notifiable)
    {
        return CampfireMessage::create()->data('Hello from my chatbot 🤖');
    }
}

    public function routeNotificationForBasecamp()
    {
        return 'https://basecamp3.lvh.me';
    }

 CampfireMessage::create()->data("It Doesn't Have To Be Crazy At Work");

CampfireMessage::create()
  ->summary('This is the text/markup used as the summary')
  ->details('This is the text/markup that is hidden unless clicked on in the UI');