Skip to content
View as Markdown

FunnelSubscriber Model

DB Table Name{wp_db_prefix}_fc_funnel_subscribers
SchemaCheck Schema
Source Filefluent-crm/app/Models/FunnelSubscriber.php
Name SpaceFluentCrm\App\Models
ClassFluentCrm\App\Models\FunnelSubscriber

Attributes

AttributeData TypeComment
idInteger
funnel_idInteger
starting_sequence_idInteger
next_sequenceInteger
subscriber_idInteger
last_sequence_id Integer
next_sequence_idInteger
last_sequence_status String
statusString
type String
last_executed_timeDate Time
next_execution_timeDate Time
notes String
source_trigger_nameString
delayInteger
source_ref_id Integer
created_atDate Time
updated_atDate Time

Usage

Please check Model Basic for Common methods.

Accessing Attributes

php

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

$funnelSequence->id; // returns id
$funnelSequence->type; // returns type
.......

Fillable Attributes

php
'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'

Scopes

This model has the following scopes that you can use

active()

Shorthand for active funnel subscribers

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

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:

php
// Accessing the relationship
$funnel = $funnelSubscriber->funnel;

next_sequence_item

Get the next sequence funnel item

  • returns FluentCrm\App\Models\FunnelSequence Model

Example:

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

last_sequence

Get all the actions of Funnel Sequence related to this funnel

  • returns FluentCrm\App\Models\FunnelSequence Model

Example:

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

metrics

Get all the actions of Funnel Sequence related to this funnel

  • returns FluentCrm\App\Models\FunnelMetric Model Collection

Example:

php
// Accessing the relationship
$metrics = $funnelSubscriber->metrics;

subscriber

Get all the actions of Funnel Sequence related to this funnel

  • returns FluentCrm\App\Models\FunnelMetric Model Collection

Example:

php
// Accessing the relationship
$subscriber = $funnelSubscriber->subscriber;