Menu

## EditSmsTemplate extends Component
in package
uses LivewireAlert

EditSmsTemplate.php : 27

Class EditSmsTemplate

Livewire component responsible for editing existing SMS template records in the Admin Settings section.

This component handles:

- Loading SMS template details
- Form validation
- Updating SMS template data
- Success alerts

### Table of Contents

#### Properties

$sms_template_id : int|string|null
  SMS template identifier.
$status : bool|int|string
  SMS template status (active/inactive).
$template : string|null
  SMS template content/body.
$template_id : string|null
  External provider template ID.

#### Methods

mount() : void
  Lifecycle hook executed when the component is mounted.
render() : View
  Render the Livewire component view.
submitTemplate() : RedirectResponse|void
  Handle SMS template update submission.

### Properties

#### $sms_template_id

EditSmsTemplate.php : 36

SMS template identifier.

`public int|string|null $sms_template_id`

#### $status

EditSmsTemplate.php : 51

SMS template status (active/inactive).

`public bool|int|string $status = true`

##### Attributes

#[Rule]
  'required'

#### $template

EditSmsTemplate.php : 59

SMS template content/body.

`public string|null $template`

##### Attributes

#[Rule]
  'required'

#### $template_id

EditSmsTemplate.php : 43

External provider template ID.

`public string|null $template_id`

##### Attributes

#[Rule]
  'required'

### Methods

#### mount()

EditSmsTemplate.php : 71

Lifecycle hook executed when the component is mounted.

`public mount(int|string $id) : void`

Loads SMS template details based on the provided ID and populates the form fields.

##### Parameters

$id : int|string

  SMS template ID

#### render()

EditSmsTemplate.php : 90

Render the Livewire component view.

`public render() : View`

Displays the SMS template edit form.

##### Return values

View

#### submitTemplate()

EditSmsTemplate.php : 104

Handle SMS template update submission.

`public submitTemplate() : RedirectResponse|void`

Validates input data, updates the SMS template, displays a success alert, and redirects back to the SMS template listing page.

##### Return values

RedirectResponse|void

## Search results