PHP code example of fenil / eatcard-mail-companion

1. Go to this page and download the library: Download fenil/eatcard-mail-companion 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/ */

    

fenil / eatcard-mail-companion example snippets


use Weboccult\EatcardMailCompanion\Helpers\eatcardMailSend;

php artisan eatcardMailcompanion:publish --type=config

use Weboccult\EatcardMailCompanion\Helpers\eatcardMailSend;

eatcardMailSend()
    ->payload(['store_id' => $order['store_id'], 'recipient_type' => 'order.done'])
    ->subject(__('messages.takeaway_order_done_mail_sub') . ' ' . getDutchDate($order['order_date']))
    ->recipients($order['email'])
    ->bcc([])
    ->cc([])
    ->mailType('Order done mail from admin')
    ->fromName(env('MAIL_FROM_NAME'))
    ->template('Reservation create')
    ->entityType('order')
    ->entityId($order['id'])
    ->dispatch();

OR
use Weboccult\EatcardMailCompanion\EatcardMailCompanion;

EatcardMailCompanion::
    payload(['store_id' => $order['store_id'], 'recipient_type' => 'order.done'])
    ->subject(__('messages.takeaway_order_done_mail_sub') . ' ' . getDutchDate($order['order_date']))
    ->recipients($order['email'])
    ->bcc([])
    ->cc([])
    ->mailType('Order done mail from admin')
    ->fromName(env('MAIL_FROM_NAME'))
    ->template('Reservation create')
    ->entityType('order')
    ->entityId($order['id'])
    ->dispatch();