Skip to content

🏷️ Meta Model

The Meta model is a polymorphic table used to store metadata for various entities in FluentBooking, including Calendars, Events, and Users.

Attributes

AttributeTypeDescription
idbigintPrimary key
object_typevarchare.g., Calendar, calendar_event, user_meta
object_idbigintID of the related object
keyvarcharMeta key name
valuelongtextMeta value (auto-serialized/unserialized)
created_attimestampRecord creation time
updated_attimestampRecord last update time

Usage Examples

Generic Meta Retrieval

php
use FluentBooking\App\Models\Meta;

$settings = Meta::where('object_type', 'Calendar')
    ->where('object_id', 1)
    ->where('key', 'event_order')
    ->first();