Menu

## SendEmergencyNotification uses trait:short

SendEmergencyNotification.php : 24

##### Tags

class

  trait Trait for SendEmergencyNotification Processes

### Table of Contents

#### Properties

$RESPONSE_TYPE : mixed

#### Methods

emergencySMS() : string
  Send Emergency SMS Notification
getOTP() : string
  Send OTP via SMS
selectEmergencyNotification() : void
  Send an emergency notification via SMS, push, and activity log.
sendSMS() : string
  Send SMS via MSG91 Gateway

### Properties

#### $RESPONSE_TYPE

MSG91.php : 26
`private mixed $RESPONSE_TYPE = 'json'`

### Methods

#### emergencySMS()

MSG91.php : 180

Send Emergency SMS Notification

`public emergencySMS(string $message_content, string $mobileNumber) : string`

Sends an emergency notification SMS to one or more mobile numbers. Message format: "GegoK12. Message : [message_content]" Uses reminder API credentials from environment variables.

##### Parameters

$message_content : string

  The emergency notification message

$mobileNumber : string

  Mobile number(s) to send to (comma-separated for multiple)

##### Tags

throws
  Exception

  Logs exceptions without throwing

##### Return values

string —

API response from MSG91 gateway

#### getOTP()

MSG91.php : 116

Send OTP via SMS

`public getOTP(string $OTP, string $mobileNumber) : string`

Generates and sends a One-Time Password (OTP) to the specified mobile number. Message format: "Welcome to GegoK12. Your OTP is : [OTP]" Uses reminder API credentials from environment variables.

##### Parameters

$OTP : string

  The OTP code to send

$mobileNumber : string

  Mobile number to send OTP to

##### Tags

throws
  Exception

  Logs exceptions without throwing

##### Return values

string —

API response from MSG91 gateway

#### selectEmergencyNotification()

SendEmergencyNotification.php : 39

Send an emergency notification via SMS, push, and activity log.

`public selectEmergencyNotification(object $data, int $school_id, string $admin_email, User $parent, User $admin, User $student) : void`

##### Parameters

$data : object

  Payload containing the emergency message

$school_id : int

  School identifier

$admin_email : string

  Sender email address

$parent : User

  Parent user receiving the message

$admin : User

  Admin user performing the action

$student : User

  Student associated with the parent

#### sendSMS()

MSG91.php : 41

Send SMS via MSG91 Gateway

`public sendSMS(string $content, string $to) : string`

Sends an SMS message to one or more mobile numbers using MSG91 API. Updates Reminder records with API response after sending. Uses environment variables for API credentials.

##### Parameters

$content : string

  The message content to send

$to : string

  Mobile number(s) to send to (comma-separated for multiple)

##### Tags

throws
  Exception

  Logs exceptions without throwing

##### Return values

string —

API response from MSG91 gateway

## Search results