Airport Guide Documentation

GalleryPhoto extends Model
in package
uses HasFactory

Gallery Photo Model

This model manages individual photos within galleries for the CICMS system. It stores photo details, metadata, file paths, and sorting information for organizing and displaying photos within gallery collections.

Table of Contents

Properties

$fillable  : array<string|int, string>
The attributes that are mass assignable.

Methods

__construct()  : void
Create a new GalleryPhoto model instance.
getMaxSortBy()  : Model|null
Get the maximum sort order for photos in a specific gallery.

Properties

$fillable

The attributes that are mass assignable.

protected array<string|int, string> $fillable = ['gallery_id', 'gphoto_name', 'gphoto_title', 'gphoto_desc', 'gphoto_dimension', 'photo_path', 'sort_by', 'gphoto_alttag', 'created_by', 'updated_by', 'created_at', 'updated_at']

Methods

__construct()

Create a new GalleryPhoto model instance.

public __construct() : void

Sets the table name from configuration constants.

getMaxSortBy()

Get the maximum sort order for photos in a specific gallery.

public getMaxSortBy(int $galleryId) : Model|null

This function is used to check maximum sort_by value based on galleryId. It helps determine the next available sort position for new photos.

Parameters
$galleryId : int

The gallery identifier

Return values
Model|null

        
On this page

Search results