1. Go to this page and download the library: Download deyan-ardi/ganadev-notif 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/ */
use DeyanArdi\GanadevNotif\GanadevApi;
public function sendingMessageText(){
$send_to = "[email protected]";
$subject = "Test Subject";
// Using Text Message
$message = "Text Message"
GanadevApi::sendMailMessage($send_to, $subject, $message)
}
public function sendingWithCustomView(){
$send_to = "[email protected]";
$subject = "Test Subject";
// Using Laravel Views
$message = view('emails.exampleNotification', compact('subject','send_to'))->render(); // Your custom view with render method
GanadevApi::sendMailMessage($send_to, $subject, $message)
}
use DeyanArdi\GanadevNotif\GanadevApi;
public function sendingMessageText(){
$send_to = "[email protected]";
$subject = "Test Subject";
$filename = "test.jpg"; // Filename must with file extension, support all document (docx, doc, xls, xlsx, video, audio, image, pdf dan zip)
$link = "https://[yourdomain]/images/test.jpg"; //File must be upload on server, cant support localhost
$mime_type ="image/jpeg";
// Using Text Message
$message = "Text Message"
GanadevApi::sendMailMedia($send_to, $subject, $message, $filename, $link, $mime_type);
}
public function sendingWithCustomView(){
$send_to = "[email protected]";
$subject = "Test Subject";
$filename = "test.jpg"; // Filename must with file extension, support all document (docx, doc, xls, xlsx, video, audio, image, pdf dan zip)
$link = "https://[yourdomain]/images/test.jpg"; //File must be upload on server, cant support localhost
$mime_type ="image/jpeg";
// Using Laravel Views
$message = view('emails.exampleNotification', compact('subject','send_to'))->render(); // Your custom view with render method
GanadevApi::sendMailMedia($send_to, $subject, $message, $filename, $link, $mime_type)
}
use DeyanArdi\GanadevNotif\GanadevApi;
public function yourExampleFunction(){
$send_to = "6281915003004" // Must
use DeyanArdi\GanadevNotif\GanadevApi;
public function sendingImageVideo(){
$send_to = "6281915003004" // Must yourdomain]/images/test.jpg";
// If you choose type "image" or "video", you can add caption for message
$caption = "Text Message"
GanadevApi::sendWaMedia($send_to, $link, $type, $caption)
}
public function sendingAudio(){
$send_to = "6281915003004" // Must yourdomain]/images/test.jpg";
$ppt = true; // If you choose type "audio, you can add ppt configuration, the value is true = voice note | false = audio
GanadevApi::sendWaMedia($send_to, $link, $type, $ppt)
}
public function sendingOtherMedia(){
$send_to = "6281915003004" // Must yourdomain]/images/test.jpg";
// If you choose "pdf","xls","xlsx","doc","docx","zip", you can follow this
GanadevApi::sendWaMedia($send_to, $link, $type)
}
use DeyanArdi\GanadevNotif\GanadevApi;
public function yourExampleFunction(){
GanadevApi::getDevice() // This method return detail of your device using in app, this request using api token and device id to get
}
{
"status":200,
"message":"<MESSAGE API RESPONSE HERE>"
"data":"<DATA GET FROM SERVER API>"
}
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.