# fluent-boards/2.0.12/app/Models/BoardTerm.php

FluentBoards – Project Management, Task Management, Goal Tracking, Kanban Board, and, Team Collaboration, version 2.0.12. 41 lines.

- Page: https://pluginprobe.com/plugins/fluent-boards/2.0.12/code/app/Models/BoardTerm.php
- Raw: https://pluginprobe.com/plugins/fluent-boards/2.0.12/raw/app/Models/BoardTerm.php
- Modified: 2024-05-31T06:41:46+00:00

Line numbers below start at 1. Link to a line or a range by appending a fragment to the
page URL, for example `https://pluginprobe.com/plugins/fluent-boards/2.0.12/code/app/Models/BoardTerm.php#L10-L20`.

```php
<?php

namespace FluentBoards\App\Models;

class BoardTerm extends Model
{
    /*
     * Do not call this model directly,
     * use FluentBoards\App\Models\Stage for stages
     * or, FluentBoards\App\Models\Label for labels
     * or Extends this model for custom terms
     */
    protected $table = 'fbs_board_terms';

//    protected $guarded = ['id'];
    protected $fillable = ['board_id', 'title', 'slug', 'type', 'position', 'settings', 'color', 'bg_color', 'archived_at', 'updated_at'];

    public function setSettingsAttribute($settings)
    {
        $originalSettings = $this->getOriginal('settings');

        $originalSettings = \maybe_unserialize($originalSettings);

        foreach ($settings as $key => $value) {
            $originalSettings[$key] = $value;
        }

        $this->attributes['settings'] = \maybe_serialize($originalSettings);
    }

    public function getSettingsAttribute($settings)
    {
        return maybe_unserialize($settings);
    }

    public function board()
    {
        return $this->belongsTo(Board::class, 'board_id');
    }
}

```
