Skip to content

Creative PRO

A marketing creative asset (banner, image, or text) managed in FluentAffiliate Pro.

Table: fa_creatives
Class: FluentAffiliate\\App\\Models\\Creative.php

Columns

ColumnTypeNullableDefaultDescription
idBIGINT(20)NOPrimary key, auto-increment.
nameVARCHAR(255)NOCreative asset name.
descriptionTEXTYESFree-text description.
typeVARCHAR(100)NOCreative type — image, text, html, banner.
imageTEXTYESURL of the creative image asset.
textTEXTYESText content for text-type creatives.
urlTEXTYESDestination URL linked from the creative.
privacyVARCHAR(100)YESpublicVisibility — public or private.
statusVARCHAR(100)YESactiveRecord status.
affiliate_idsJSONYESJSON array of affiliate IDs this creative is restricted to.
group_idsJSONYESJSON array of group IDs this creative is restricted to.
metaLONGTEXTYESAdditional metadata for the creative.
created_atTIMESTAMPYESTimestamp when the record was created.
updated_atTIMESTAMPYESTimestamp when the record was last updated.

Query Scopes

ScopeDescription
ofStatus($status)Filter by status.
ofType($type)Filter by creative type.
publicCreatives()Restrict to publicly visible creatives.

Usage Example

php
use FluentAffiliatePro\App\Models\Creative;

$banners = Creative::ofStatus('active')
    ->ofType('image')
    ->publicCreatives()
    ->get();

Released under the GPL-2.0 License.