Skip to content

Team Model ​

DB Table Name{wp_db_prefix}fbs_teams
SchemaCheck Schema
Source Filefluent-boards/app/Models/Team.php
Name SpaceFluentBoards\App\Models
ClassFluentBoards\App\Models\Team

Attributes ​

AttributeData TypeComment
idINT UNSIGNEDPrimary key
parent_idINT UNSIGNED NULLParent team
titleVARCHAR(100)Team name
descriptionTEXT NULLDescription
typeVARCHAR(50)Team type
visibilityVARCHAR(50)VISIBLE (default) or SECRET
notifications_enabledTINYINT(1)Default 1
settingsTEXT NULLSerialized; returned as an array
created_byBIGINT UNSIGNEDCreator user ID
created_atTIMESTAMP NULL
updated_atTIMESTAMP NULL

Usage ​

Please check Model Basic for common methods.

php
$team = FluentBoards\App\Models\Team::create([
    'title'      => 'Design',
    'type'       => 'team',
    'created_by' => get_current_user_id(),
]);

Relations ​

parent ​

The parent team (parent_id).

  • Returns FluentBoards\App\Models\Team
php
$parentTitle = $team->parent ? $team->parent->title : '';