Menu

## ContactController extends Controller
in package
uses MSG91

ContactController.php : 16

### Table of Contents

#### Properties

$RESPONSE_TYPE : mixed

#### Methods

create() : Response
  Show the form for creating a new resource.
emergencySMS() : string
  Send Emergency SMS Notification
getOTP() : string
  Send OTP via SMS
index() : Response
  Display a listing of the resource.
sendSMS() : string
  Send SMS via MSG91 Gateway
store() : Response
  Store a newly created resource in storage.

### Properties

#### $RESPONSE_TYPE

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

### Methods

#### create()

ContactController.php : 39

Show the form for creating a new resource.

`public create() : Response`

##### Return values

Response

#### 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

#### index()

ContactController.php : 24

Display a listing of the resource.

`public index() : Response`

##### Return values

Response

#### 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

#### store()

ContactController.php : 50

Store a newly created resource in storage.

`public store(Request $request) : Response`

##### Parameters

$request : Request

##### Return values

Response

## Search results