Menu

## PlanForm extends Component
in package
uses LivewireAlert

PlanForm.php : 25

Class PlanForm

Livewire component responsible for creating and updating subscription plans in the Admin Settings section.

This component handles:

- Plan creation
- Plan editing
- Validation of plan limits
- Success alerts

### Table of Contents

#### Properties

$amount : float|int|string|null
  Plan price amount.
$cycle : string|null
  Billing cycle of the plan (monthly/yearly).
$name : string|null
  Plan display name.
$no_of_audios : int|string|null
  Maximum number of audios allowed.
$no_of_bulletins : int|string|null
  Maximum number of bulletins allowed.
$no_of_events : int|string|null
  Maximum number of events allowed.
$no_of_files : int|string|null
  Maximum number of files allowed.
$no_of_folders : int|string|null
  Maximum number of folders allowed.
$no_of_groups : int|string|null
  Maximum number of groups allowed.
$no_of_members : int|string|null
  Maximum number of members allowed.
$no_of_videos : int|string|null
  Maximum number of videos allowed.
$order : int|string|null
  Display order of the plan.
$planEditId : int|string|null
  Plan ID used for edit mode.
$status : int|string
  Plan active status.

#### Methods

mount() : void
  Lifecycle hook executed when the component is mounted.
render() : View
  Render the Livewire component view.
submitPlan() : RedirectResponse
  Handle plan form submission.

### Properties

#### $amount

PlanForm.php : 66

Plan price amount.

`public float|int|string|null $amount`

##### Attributes

#[Rule]
  'required'

#### $cycle

PlanForm.php : 34

Billing cycle of the plan (monthly/yearly).

`public string|null $cycle`

##### Attributes

#[Rule]
  'required'

#### $name

PlanForm.php : 42

Plan display name.

`public string|null $name`

##### Attributes

#[Rule]
  'required'

#### $no_of_audios

PlanForm.php : 114

Maximum number of audios allowed.

`public int|string|null $no_of_audios`

##### Attributes

#[Rule]
  'required'

#### $no_of_bulletins

PlanForm.php : 122

Maximum number of bulletins allowed.

`public int|string|null $no_of_bulletins`

##### Attributes

#[Rule]
  'required'

#### $no_of_events

PlanForm.php : 82

Maximum number of events allowed.

`public int|string|null $no_of_events`

##### Attributes

#[Rule]
  'required'

#### $no_of_files

PlanForm.php : 98

Maximum number of files allowed.

`public int|string|null $no_of_files`

##### Attributes

#[Rule]
  'required'

#### $no_of_folders

PlanForm.php : 90

Maximum number of folders allowed.

`public int|string|null $no_of_folders`

##### Attributes

#[Rule]
  'required'

#### $no_of_groups

PlanForm.php : 130

Maximum number of groups allowed.

`public int|string|null $no_of_groups`

##### Attributes

#[Rule]
  'required'

#### $no_of_members

PlanForm.php : 74

Maximum number of members allowed.

`public int|string|null $no_of_members`

##### Attributes

#[Rule]
  'required'

#### $no_of_videos

PlanForm.php : 106

Maximum number of videos allowed.

`public int|string|null $no_of_videos`

##### Attributes

#[Rule]
  'required'

#### $order

PlanForm.php : 50

Display order of the plan.

`public int|string|null $order`

##### Attributes

#[Rule]
  'required'

#### $planEditId

PlanForm.php : 138

Plan ID used for edit mode.

`public int|string|null $planEditId`

#### $status

PlanForm.php : 58

Plan active status.

`public int|string $status = 1`

##### Attributes

#[Rule]
  'required'

### Methods

#### mount()

PlanForm.php : 149

Lifecycle hook executed when the component is mounted.

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

Loads plan details when editing an existing plan and populates the form fields.

##### Parameters

$id : int|string|null

  Plan ID

#### render()

PlanForm.php : 221

Render the Livewire component view.

`public render() : View`

Displays the plan create/edit form.

##### Return values

View

#### submitPlan()

PlanForm.php : 183

Handle plan form submission.

`public submitPlan() : RedirectResponse`

Validates input data and performs:

- Plan creation (if new)
- Plan update (if editing)

Displays success alerts and redirects to the plan detail page.

##### Return values

RedirectResponse

## Search results