PHP code example of grigio / notifications

1. Go to this page and download the library: Download grigio/notifications 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/ */

    

grigio / notifications example snippets

 php artisan vendor:publish 

  class YourNotification extends GrigioNotification {
  
    public function viaSmsIR()
    {
        $data = $this->data();
        $this->setReceiver(
          //Get mobile from $data
        );
        $this->setMessage(
            //Put your message here
        );
        return $this->sendPrepration();
    }

    public function viaEmail()
    {
        $data = $this->data();
        $this->setSubject(
          // Email title
        );
        $this->setReceiver(
          //Reciver email address
        );
        $this->setMessage(view('Your Email Template', ['data' => $data]));
        return $this->sendPrepration();

    }
  }