BusinessFeatures
extends Model
in package
uses
HasFactory
BusinessFeatures Model for managing business amenities, services, and operational features.
This model is used to create and manage business feature data including payment methods, dining services, delivery options, seating arrangements, and dietary accommodations. It provides a structured interface for storing and retrieving business-specific feature information such as payment options, meal service availability, delivery and takeout services, outdoor seating availability, and dietary preference accommodations. The model supports comprehensive business feature management including service offerings, payment methods, and customer accommodation features for enhanced airport guide platform functionality and business service directory management.
Table of Contents
Properties
- $breakfast : bool
- $brunch : bool
- $business_id : int
- $created_at : string
- $delivery_service : bool
- $dinner : bool
- $id : int
- $lunch : bool
- $outdoor_seating : bool
- $payment_method : string
- $service_takeout : bool
- $updated_at : string
- $vegeterian_diet : bool
- $fillable : array<string|int, mixed>
- The attributes that are mass assignable for business features records.
Methods
- __construct() : void
- Initialize the BusinessFeatures model with the correct database table configuration.
Properties
$breakfast
public
bool
$breakfast
Whether breakfast service is available
$brunch
public
bool
$brunch
Whether brunch service is available
$business_id
public
int
$business_id
The foreign key reference to the business
$created_at
public
string
$created_at
Timestamp when the record was created
$delivery_service
public
bool
$delivery_service
Whether delivery service is available
$dinner
public
bool
$dinner
Whether dinner service is available
$id
public
int
$id
The unique identifier for the business features record
$lunch
public
bool
$lunch
Whether lunch service is available
$outdoor_seating
public
bool
$outdoor_seating
Whether outdoor seating is available
$payment_method
public
string
$payment_method
The accepted payment methods
$service_takeout
public
bool
$service_takeout
Whether takeout service is available
$updated_at
public
string
$updated_at
Timestamp when the record was last updated
$vegeterian_diet
public
bool
$vegeterian_diet
Whether vegetarian diet options are available (note: typo in field name)
$fillable
The attributes that are mass assignable for business features records.
protected
array<string|int, mixed>
$fillable
= ['id', 'business_id', 'payment_method', 'breakfast', 'brunch', 'lunch', 'dinner', 'delivery_service', 'service_takeout', 'outdoor_seating', 'vegeterian_diet', 'created_at', 'updated_at']
This property defines the fields that can be mass-assigned when creating or updating BusinessFeatures records. It includes all essential business features fields such as identification, business relationships, payment methods, dining services, delivery options, seating arrangements, and dietary accommodations. The fillable attributes ensure data integrity while allowing efficient bulk operations for business features management and service offering tracking. Note: vegeterian_diet has a typo in the field name.
Methods
__construct()
Initialize the BusinessFeatures model with the correct database table configuration.
public
__construct() : void
This function is used to create a properly configured BusinessFeatures model instance by setting the database table name from the configuration constants. It ensures that the model interacts with the correct database table for business features data information, which is essential for proper business features storage and retrieval operations. The constructor dynamically assigns the table name based on the BUSINESS_FEATURES configuration constant to maintain flexibility and configuration-driven behavior for business features data management.