# FunnelSubscriber Model

DB Table Name {wp_db_prefix}_fc_funnel_subscribers
Schema Check Schema
Source File fluent-crm/app/Models/FunnelSubscriber.php
Name Space FluentCrm\App\Models
Class FluentCrm\App\Models\FunnelSubscriber

# Attributes

Attribute Data Type Comment
id Integer
funnel_id Integer
starting_sequence_id Integer
next_sequence Integer
subscriber_id Integer
last_sequence_id Integer
next_sequence_id Integer
last_sequence_status String
status String
type String
last_executed_time Date Time
next_execution_time Date Time
notes String
source_trigger_name String
delay Integer
source_ref_id Integer
created_at Date Time
updated_at Date Time

# Usage

Please check Model Basic for Common methods.

# Accessing Attributes


$funnelSubscriber = FluentCrm\App\Models\FunnelSubscriber::find(1);

$funnelSequence->id; // returns id
$funnelSequence->type; // returns type
.......
1
2
3
4
5
6

# Fillable Attributes

'funnel_id',
'starting_sequence_id',
'next_sequence',
'subscriber_id',
'last_sequence_id',
'next_sequence_id',
'last_sequence_status', // pending | : Default: pending
'status',
'type',
'last_executed_time',
'next_executed_time',
'notes',
'source_trigger_name',
'source_ref_id'

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15

# Scopes

This model has the following scopes that you can use

# active()

Shorthand for active funnel subscribers

// get all active funnel subscribers
$funnelSubscribers = FluentCrm\App\Models\FunnelSubscriber::active()->get();
1
2

# Relations

This model has the following relationship that you can use

# funnel

Get the Funnel related to this funnel subscriber

  • returns FluentCrm\App\Models\Funnel Model

# Example:

// Accessing the relationship
$funnel = $funnelSubscriber->funnel;
1
2

# next_sequence_item

Get the next sequence funnel item

  • returns FluentCrm\App\Models\FunnelSequence Model

# Example:

// Accessing the relationship
$nextSequence = $funnelSubscriber->next_sequence_item;
1
2

# last_sequence

Get all the actions of Funnel Sequence related to this funnel

  • returns FluentCrm\App\Models\FunnelSequence Model

# Example:

// Accessing the relationship
$lastSequence = $funnelSubscriber->last_sequence;
1
2

# metrics

Get all the actions of Funnel Sequence related to this funnel

  • returns FluentCrm\App\Models\FunnelMetric Model Collection

# Example:

// Accessing the relationship
$metrics = $funnelSubscriber->metrics;
1
2

# subscriber

Get all the actions of Funnel Sequence related to this funnel

  • returns FluentCrm\App\Models\FunnelMetric Model Collection

# Example:

// Accessing the relationship
$subscriber = $funnelSubscriber->subscriber;
1
2