Skip to content

Instantly share code, notes, and snippets.

@mansha99
Created August 19, 2023 10:57
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mansha99/624ea5d5e005184422d983bffab4da94 to your computer and use it in GitHub Desktop.
Save mansha99/624ea5d5e005184422d983bffab4da94 to your computer and use it in GitHub Desktop.
<?php
namespace App\Events;
use App\Models\Order;
use Illuminate\Foundation\Events\Dispatchable;
class AddressChangeEvent
{
use Dispatchable;
public $shortMessage = '';
public $longMessage = '';
public function __construct(
public Order $order
) {
//Get Order from Database
//Get deliveryAddress from Order
//Compose a Short Message for SMS and Long SMS for others
$this->shortMessage = " This is Short Message for change in Delivery Address";
$this->longMessage = " This is a Long Long Message for change in Delivery Address";
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment