All contact us details should be retrieved and used from the models dteails below:
app\Models/Organization.php detaling below:

<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\SoftDeletes;

/**
 * Organization Model
 *
 * Represents an organization with its basic details including contact information,
 * location, formation year, and social media links. This is the central entity
 * for the Organization Configuration Module.
 *
 * @property int $id
 * @property string $name
 * @property string $short_name
 * @property string $country
 * @property string $city
 * @property string $postal_address
 * @property string $postal_code
 * @property string $physical_address
 * @property string $email
 * @property string $hotline
 * @property int $year_of_formation
 * @property array|null $social_media_links
 * @property \Illuminate\Support\Carbon|null $created_at
 * @property \Illuminate\Support\Carbon|null $updated_at
 * @property \Illuminate\Support\Carbon|null $deleted_at
 */
class Organization extends Model
{
    use HasFactory, SoftDeletes;

    /**
     * The attributes that are mass assignable.
     *
     * @var array<int, string>
     */
    protected $fillable = [
        'name',
        'short_name',
        'country',
        'city',
        'postal_address',
        'postal_code',
        'physical_address',
        'email',
        'hotline',
        'year_of_formation',
        'social_media_links',
    ];

    /**
     * The attributes that should be cast.
     *
     * @var array<string, string>
     */
    protected $casts = [
        'social_media_links' => 'array',
        'year_of_formation' => 'integer',
        'created_at' => 'datetime',
        'updated_at' => 'datetime',
    ];

    /**
     * Get the leadership positions for the organization.
     *
     * @return \Illuminate\Database\Eloquent\Relations\HasMany
     */
    public function leadershipPositions()
    {
        return $this->hasMany(LeadershipPosition::class);
    }

    /**
     * Get the election cycles for the organization.
     *
     * @return \Illuminate\Database\Eloquent\Relations\HasMany
     */
    public function electionCycles()
    {
        return $this->hasMany(ElectionCycle::class);
    }

    /**
     * Get the voting procedures for the organization.
     *
     * @return \Illuminate\Database\Eloquent\Relations\HasMany
     */
    public function votingProcedures()
    {
        return $this->hasMany(VotingProcedure::class);
    }

    /**
     * Get the leadership history records for the organization.
     *
     * @return \Illuminate\Database\Eloquent\Relations\HasMany
     */
    public function leadershipHistories()
    {
        return $this->hasMany(LeadershipHistory::class);
    }

    /**
     * Get the staff history records for the organization.
     *
     * @return \Illuminate\Database\Eloquent\Relations\HasMany
     */
    public function staffHistories()
    {
        return $this->hasMany(StaffHistory::class);
    }

    /**
     * Get the root leadership positions (positions without parent).
     *
     * @return \Illuminate\Database\Eloquent\Relations\HasMany
     */
    public function rootLeadershipPositions()
    {
        return $this->hasMany(LeadershipPosition::class)->whereNull('parent_position_id');
    }

    /**
     * Get the current leadership assignments for the organization.
     *
     * @return \Illuminate\Database\Eloquent\Collection
     */
    public function getCurrentLeadershipAssignments()
    {
        return LeadershipAssignment::whereHas('leadershipPosition', function ($query) {
            $query->where('organization_id', $this->id);
        })->where('is_current', true)->with(['user', 'leadershipPosition'])->get();
    }

    /**
     * Get the full address as a formatted string.
     *
     * @return string
     */
    public function getFullAddressAttribute(): string
    {
        return "{$this->physical_address}, {$this->city}, {$this->country}";
    }

    /**
     * Get the social media link for a specific platform.
     *
     * @param string $platform
     * @return string|null
     */
    public function getSocialMediaLink(string $platform): ?string
    {
        return $this->social_media_links[$platform] ?? null;
    }

    /**
     * Get the age of the organization in years.
     *
     * @return int
     */
    public function getAgeAttribute(): int
    {
        return now()->year - $this->year_of_formation;
    }
}





All the implementations of gallery images will be retrieved from the following models:

app\Models/Gallery.php
<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\SoftDeletes;
use Illuminate\Database\Eloquent\Relations\BelongsTo;
use Illuminate\Database\Eloquent\Relations\HasMany;

/**
 * Gallery Model
 *
 * Represents a gallery collection belonging to an organization.
 * Contains multiple images with titles and descriptions.
 * Tracks creation by users and maintains publication status.
 *
 * @property int $id
 * @property int $organization_id
 * @property int $gallery_type_id
 * @property string $title
 * @property string|null $description
 * @property int $image_count
 * @property bool $is_published
 * @property int $sort_order
 * @property int|null $created_by
 * @property int|null $updated_by
 * @property \Illuminate\Support\Carbon|null $created_at
 * @property \Illuminate\Support\Carbon|null $updated_at
 * @property \Illuminate\Support\Carbon|null $deleted_at
 */
class Gallery extends Model
{
    use HasFactory, SoftDeletes;

    protected $table = 'galleries';

    // =========================================================================
    // ATTRIBUTES & CASTING
    // =========================================================================

    protected $fillable = [
        'organization_id',
        'gallery_type_id',
        'title',
        'description',
        'image_count',
        'is_published',
        'sort_order',
        'created_by',
        'updated_by',
    ];

    protected $casts = [
        'image_count'   => 'integer',
        'is_published'  => 'boolean',
        'sort_order'    => 'integer',
        'created_at'    => 'datetime',
        'updated_at'    => 'datetime',
        'deleted_at'    => 'datetime',
    ];

    protected $attributes = [
        'image_count'  => 0,
        'is_published' => true,
        'sort_order'   => 0,
    ];

    // =========================================================================
    // RELATIONSHIPS
    // =========================================================================

    /**
     * Get the organization this gallery belongs to.
     */
    public function organization(): BelongsTo
    {
        return $this->belongsTo(Organization::class, 'organization_id');
    }

    /**
     * Get the gallery type.
     */
    public function type(): BelongsTo
    {
        return $this->belongsTo(GalleryType::class, 'gallery_type_id');
    }

    /**
     * Get all images in this gallery.
     */
    public function images(): HasMany
    {
        return $this->hasMany(GalleryImage::class, 'gallery_id');
    }

    /**
     * Get the user who created this gallery.
     */
    public function creator(): BelongsTo
    {
        return $this->belongsTo(User::class, 'created_by');
    }

    /**
     * Get the user who last updated this gallery.
     */
    public function updater(): BelongsTo
    {
        return $this->belongsTo(User::class, 'updated_by');
    }

    // =========================================================================
    // QUERY SCOPES
    // =========================================================================

    /**
     * Scope to filter only published galleries.
     */
    public function scopePublished($query)
    {
        return $query->where('is_published', true);
    }

    /**
     * Scope to search by title or description.
     */
    public function scopeSearch($query, string $search)
    {
        return $query->where('title', 'like', "%{$search}%")
                     ->orWhere('description', 'like', "%{$search}%");
    }

    /**
     * Scope to filter by organization.
     */
    public function scopeOfOrganization($query, int $organizationId)
    {
        return $query->where('organization_id', $organizationId);
    }

    /**
     * Scope to filter by gallery type.
     */
    public function scopeOfType($query, int $typeId)
    {
        return $query->where('gallery_type_id', $typeId);
    }

    /**
     * Scope to order by sort order, then by creation date.
     */
    public function scopeOrdered($query)
    {
        return $query->orderBy('sort_order', 'asc')
                     ->orderBy('created_at', 'desc');
    }

    // =========================================================================
    // MODEL EVENTS
    // =========================================================================

    protected static function booted(): void
    {
        static::deleting(function (Gallery $gallery) {
            // Delete all related images when gallery is deleted
            foreach ($gallery->images as $image) {
                $image->delete();
            }
        });
    }

    // =========================================================================
    // HELPER METHODS
    // =========================================================================

    /**
     * Add an image to this gallery.
     */
    public function addImage(array $data): GalleryImage
    {
        return $this->images()->create($data);
    }

    /**
     * Increment image count.
     */
    public function incrementImageCount(): void
    {
        $this->increment('image_count');
    }

    /**
     * Decrement image count.
     */
    public function decrementImageCount(): void
    {
        if ($this->image_count > 0) {
            $this->decrement('image_count');
        }
    }

    /**
     * Recalculate image count from actual images.
     */
    public function syncImageCount(): void
    {
        $this->update(['image_count' => $this->images()->count()]);
    }

    /**
     * Check if gallery has any images.
     */
    public function hasImages(): bool
    {
        return $this->image_count > 0;
    }
}






app\Models/GalleryImage.php
<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\SoftDeletes;
use Illuminate\Database\Eloquent\Relations\BelongsTo;

/**
 * GalleryImage Model
 *
 * Represents a single image within a gallery.
 * Stores metadata: title, description, file path, dimensions.
 * Tracks who uploaded the image and when.
 *
 * @property int $id
 * @property int $gallery_id
 * @property string $title
 * @property string|null $description
 * @property string $image_path
 * @property string $image_name
 * @property int $file_size
 * @property string $mime_type
 * @property int|null $width
 * @property int|null $height
 * @property int $sort_order
 * @property int|null $uploaded_by
 * @property \Illuminate\Support\Carbon|null $created_at
 * @property \Illuminate\Support\Carbon|null $updated_at
 * @property \Illuminate\Support\Carbon|null $deleted_at
 */
class GalleryImage extends Model
{
    use HasFactory, SoftDeletes;

    protected $table = 'gallery_images';

    // =========================================================================
    // ATTRIBUTES & CASTING
    // =========================================================================

    protected $fillable = [
        'gallery_id',
        'title',
        'description',
        'image_path',
        'image_name',
        'file_size',
        'mime_type',
        'width',
        'height',
        'sort_order',
        'uploaded_by',
    ];

    protected $casts = [
        'file_size'  => 'integer',
        'width'      => 'integer',
        'height'     => 'integer',
        'sort_order' => 'integer',
        'created_at' => 'datetime',
        'updated_at' => 'datetime',
        'deleted_at' => 'datetime',
    ];

    protected $attributes = [
        'sort_order' => 0,
    ];

    // =========================================================================
    // RELATIONSHIPS
    // =========================================================================

    /**
     * Get the gallery this image belongs to.
     */
    public function gallery(): BelongsTo
    {
        return $this->belongsTo(Gallery::class, 'gallery_id');
    }

    /**
     * Get the user who uploaded this image.
     */
    public function uploader(): BelongsTo
    {
        return $this->belongsTo(User::class, 'uploaded_by');
    }

    // =========================================================================
    // QUERY SCOPES
    // =========================================================================

    /**
     * Scope to order by sort order.
     */
    public function scopeOrdered($query)
    {
        return $query->orderBy('sort_order', 'asc')
                     ->orderBy('created_at', 'desc');
    }

    /**
     * Scope to search by title or description.
     */
    public function scopeSearch($query, string $search)
    {
        return $query->where('title', 'like', "%{$search}%")
                     ->orWhere('description', 'like', "%{$search}%");
    }

    // =========================================================================
    // HELPER METHODS & ACCESSORS
    // =========================================================================

    /**
     * Get the formatted file size.
     */
    public function getFormattedFileSize(): string
    {
        $bytes = $this->file_size;
        if ($bytes >= 1073741824) {
            return number_format($bytes / 1073741824, 2) . ' GB';
        } elseif ($bytes >= 1048576) {
            return number_format($bytes / 1048576, 2) . ' MB';
        } elseif ($bytes >= 1024) {
            return number_format($bytes / 1024, 2) . ' KB';
        }
        return $bytes . ' B';
    }

    /**
     * Get the full URL to display the image.
     */
    public function getImageUrl(): string
    {
        return asset('storage/' . $this->image_path);
    }

    /**
     * Check if image is a photo (vs other media).
     */
    public function isImage(): bool
    {
        return str_starts_with($this->mime_type, 'image/');
    }

    /**
     * Get image dimensions as a string (e.g., "1920x1080").
     */
    public function getDimensionsString(): ?string
    {
        if ($this->width && $this->height) {
            return "{$this->width}x{$this->height}";
        }
        return null;
    }

    /**
     * Calculate aspect ratio (width/height).
     */
    public function getAspectRatio(): ?float
    {
        if ($this->width && $this->height && $this->height != 0) {
            return $this->width / $this->height;
        }
        return null;
    }
}





app\Models/GalleryType.php
<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\SoftDeletes;
use Illuminate\Database\Eloquent\Relations\HasMany;

/**
 * GalleryType Model
 *
 * Represents categories/types of galleries (e.g., "Events", "Team", "Achievements").
 * Provides organization and filtering for gallery displays.
 *
 * @property int $id
 * @property string $name
 * @property string|null $description
 * @property string $color
 * @property string $icon
 * @property bool $is_active
 * @property \Illuminate\Support\Carbon|null $created_at
 * @property \Illuminate\Support\Carbon|null $updated_at
 * @property \Illuminate\Support\Carbon|null $deleted_at
 */
class GalleryType extends Model
{
    use HasFactory, SoftDeletes;

    protected $table = 'gallery_types';

    // =========================================================================
    // ATTRIBUTES & CASTING
    // =========================================================================

    protected $fillable = [
        'name',
        'description',
        'color',
        'icon',
        'is_active',
    ];

    protected $casts = [
        'is_active'  => 'boolean',
        'created_at' => 'datetime',
        'updated_at' => 'datetime',
        'deleted_at' => 'datetime',
    ];

    protected $attributes = [
        'color'     => '#3b82f6',
        'icon'      => 'fa-images',
        'is_active' => true,
    ];

    // =========================================================================
    // RELATIONSHIPS
    // =========================================================================

    /**
     * Get all galleries of this type.
     */
    public function galleries(): HasMany
    {
        return $this->hasMany(Gallery::class, 'gallery_type_id');
    }

    // =========================================================================
    // QUERY SCOPES
    // =========================================================================

    /**
     * Scope to filter only active gallery types.
     */
    public function scopeActive($query)
    {
        return $query->where('is_active', true);
    }

    /**
     * Scope to search by name or description.
     */
    public function scopeSearch($query, string $search)
    {
        return $query->where('name', 'like', "%{$search}%")
                     ->orWhere('description', 'like', "%{$search}%");
    }

    /**
     * Scope to order by name.
     */
    public function scopeOrdered($query)
    {
        return $query->orderBy('name');
    }

    // =========================================================================
    // HELPER METHODS
    // =========================================================================

    /**
     * Get the count of galleries for this type.
     */
    public function getGalleryCount(): int
    {
        return $this->galleries()->count();
    }
}




app\Models/Slider.php
<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Builder;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\SoftDeletes;
use Illuminate\Support\Facades\Storage;

class Slider extends Model
{
    use SoftDeletes;

    protected $fillable = [
        'title',
        'image_source',
        'image_path',
        'image_filename',
        'image_size',
        'image_mime_type',
        'status',
        'order',
    ];

    protected $casts = [
        'order'  => 'integer',
        'status' => 'string',
        'image_source' => 'string',
        'image_size' => 'integer',
    ];

    /**
     * Scope: only published sliders, ordered by `order` ascending.
     */
    public function scopePublished(Builder $query): Builder
    {
        return $query->where('status', 'published')->orderBy('order', 'asc');
    }

    /**
     * Scope: filter by image source type
     */
    public function scopeByImageSource(Builder $query, string $source): Builder
    {
        return $query->where('image_source', $source);
    }

    /**
     * Scope: filter by status
     */
    public function scopeByStatus(Builder $query, string $status): Builder
    {
        return $query->where('status', $status);
    }

    /**
     * Get the public URL of the image
     * @return string
     */
    public function getImageUrl(): string
    {
        if ($this->image_source === 'upload') {
            // Return the public URL for uploaded files
            return Storage::disk('public')->url($this->image_path);
        }

        // Return the URL as-is for external URLs
        return $this->image_path;
    }

    /**
     * Check if image is an uploaded file
     */
    public function isUploadedImage(): bool
    {
        return $this->image_source === 'upload';
    }

    /**
     * Check if image is an external URL
     */
    public function isExternalImage(): bool
    {
        return $this->image_source === 'url';
    }

    /**
     * Get formatted file size (for uploaded images)
     */
    public function getFormattedFileSize(): ?string
    {
        if (!$this->image_size) {
            return null;
        }

        $bytes = $this->image_size;
        $units = ['B', 'KB', 'MB', 'GB'];
        $bytes = max($bytes, 0);
        $pow = floor(($bytes ? log($bytes) : 0) / log(1024));
        $pow = min($pow, count($units) - 1);
        $bytes /= (1 << (10 * $pow));

        return round($bytes, 2) . ' ' . $units[$pow];
    }

    /**
     * Delete uploaded image file from storage
     */
    public function deleteImageFile(): bool
    {
        if ($this->isUploadedImage() && $this->image_path) {
            try {
                return Storage::disk('public')->delete($this->image_path);
            } catch (\Exception $e) {
                \Log::error('Failed to delete slider image: ' . $e->getMessage());
                return false;
            }
        }

        return true;
    }

    /**
     * Boot the model
     */
    protected static function boot()
    {
        parent::boot();

        // Clean up uploaded image file when slider is deleted
        static::deleting(function ($slider) {
            if ($slider->isUploadedImage()) {
                $slider->deleteImageFile();
            }
        });
    }
}






app\Models/StaffHistory.php
<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\SoftDeletes;

/**
 * StaffHistory Model
 *
 * Represents an employment record for a staff member.
 * Tracks employment dates, status, position, and achievements.
 *
 * @property int $id
 * @property int $organization_id
 * @property int|null $user_id
 * @property string $staff_name
 * @property string $position
 * @property \Illuminate\Support\Carbon $employment_start_date
 * @property \Illuminate\Support\Carbon|null $employment_end_date
 * @property string $employment_status
 * @property string|null $termination_reason
 * @property string|null $passport_path
 * @property \Illuminate\Support\Carbon|null $created_at
 * @property \Illuminate\Support\Carbon|null $updated_at
 * @property \Illuminate\Support\Carbon|null $deleted_at
 */
class StaffHistory extends Model
{
    use HasFactory, SoftDeletes;

    /**
     * Employment status constants.
     */
    const STATUS_CURRENT = 'current';
    const STATUS_FORMER = 'former';

    /**
     * The attributes that are mass assignable.
     *
     * @var array<int, string>
     */
    protected $fillable = [
        'organization_id',
        'user_id',
        'staff_name',
        'position',
        'employment_start_date',
        'employment_end_date',
        'employment_status',
        'termination_reason',
        'passport_path',
    ];

    /**
     * The attributes that should be cast.
     *
     * @var array<string, string>
     */
    protected $casts = [
        'employment_start_date' => 'date',
        'employment_end_date' => 'date',
        'created_at' => 'datetime',
        'updated_at' => 'datetime',
    ];

    /**
     * The "booted" method of the model.
     */
    protected static function booted(): void
    {
        static::saving(function (StaffHistory $staff) {
            // Ensure employment status consistency
            if ($staff->employment_end_date) {
                $staff->employment_status = self::STATUS_FORMER;
            } elseif ($staff->employment_status === self::STATUS_CURRENT) {
                $staff->employment_end_date = null;
            }
        });
    }

    /**
     * Get the organization for this staff record.
     *
     * @return \Illuminate\Database\Eloquent\Relations\BelongsTo
     */
    public function organization()
    {
        return $this->belongsTo(Organization::class);
    }

    /**
     * Get the user associated with this staff record.
     *
     * @return \Illuminate\Database\Eloquent\Relations\BelongsTo
     */
    public function user()
    {
        return $this->belongsTo(User::class);
    }

    /**
     * Get the achievements for this staff record.
     *
     * @return \Illuminate\Database\Eloquent\Relations\HasMany
     */
    public function achievements()
    {
        return $this->hasMany(StaffAchievement::class);
    }

    /**
     * Add an achievement to this staff record.
     *
     * @param string $description
     * @param string $date
     * @return StaffAchievement
     */
    public function addAchievement(string $description, string $date): StaffAchievement
    {
        return $this->achievements()->create([
            'achievement_description' => $description,
            'achievement_date' => $date,
        ]);
    }

    /**
     * End this staff member's employment.
     *
     * @param string $endDate
     * @param string|null $reason
     * @return bool
     */
    public function endEmployment(string $endDate, ?string $reason = null): bool
    {
        $this->employment_end_date = $endDate;
        $this->employment_status = self::STATUS_FORMER;
        $this->termination_reason = $reason;
        return $this->save();
    }

    /**
     * Get the employment duration in days.
     *
     * @return int|null
     */
    public function getEmploymentDurationInDays(): ?int
    {
        $endDate = $this->employment_end_date ?? now();
        return $this->employment_start_date->diffInDays($endDate);
    }

    /**
     * Get the employment duration in a human-readable format.
     *
     * @return string
     */
    public function getEmploymentDurationAttribute(): string
    {
        $endDate = $this->employment_end_date ?? now();
        return $this->employment_start_date->diffForHumans($endDate, true);
    }

    /**
     * Check if this staff member is currently employed.
     *
     * @return bool
     */
    public function isCurrent(): bool
    {
        return $this->employment_status === self::STATUS_CURRENT;
    }

    /**
     * Check if this staff member is a former employee.
     *
     * @return bool
     */
    public function isFormer(): bool
    {
        return $this->employment_status === self::STATUS_FORMER;
    }

    /**
     * Get the status label.
     *
     * @return string
     */
    public function getStatusLabelAttribute(): string
    {
        return ucfirst($this->employment_status);
    }

    /**
     * Scope to get only current staff.
     *
     * @param \Illuminate\Database\Eloquent\Builder $query
     * @return \Illuminate\Database\Eloquent\Builder
     */
    public function scopeCurrent($query)
    {
        return $query->where('employment_status', self::STATUS_CURRENT);
    }

    /**
     * Scope to get only former staff.
     *
     * @param \Illuminate\Database\Eloquent\Builder $query
     * @return \Illuminate\Database\Eloquent\Builder
     */
    public function scopeFormer($query)
    {
        return $query->where('employment_status', self::STATUS_FORMER);
    }

    /**
     * Scope to filter by organization.
     *
     * @param \Illuminate\Database\Eloquent\Builder $query
     * @param int $organizationId
     * @return \Illuminate\Database\Eloquent\Builder
     */
    public function scopeForOrganization($query, int $organizationId)
    {
        return $query->where('organization_id', $organizationId);
    }

    /**
     * Scope to filter by position.
     *
     * @param \Illuminate\Database\Eloquent\Builder $query
     * @param string $position
     * @return \Illuminate\Database\Eloquent\Builder
     */
    public function scopeByPosition($query, string $position)
    {
        return $query->where('position', 'like', "%{$position}%");
    }

    /**
     * Scope to filter by date range.
     *
     * @param \Illuminate\Database\Eloquent\Builder $query
     * @param string $startDate
     * @param string $endDate
     * @return \Illuminate\Database\Eloquent\Builder
     */
    public function scopeDateRange($query, string $startDate, string $endDate)
    {
        return $query->where(function ($q) use ($startDate, $endDate) {
            $q->whereBetween('employment_start_date', [$startDate, $endDate])
                ->orWhereBetween('employment_end_date', [$startDate, $endDate]);
        });
    }

    /**
     * Scope to search by staff name or position.
     *
     * @param \Illuminate\Database\Eloquent\Builder $query
     * @param string $search
     * @return \Illuminate\Database\Eloquent\Builder
     */
    public function scopeSearch($query, string $search)
    {
        return $query->where(function ($q) use ($search) {
            $q->where('staff_name', 'like', "%{$search}%")
                ->orWhere('position', 'like', "%{$search}%");
        });
    }

    /**
     * Scope to order by employment start date.
     *
     * @param \Illuminate\Database\Eloquent\Builder $query
     * @param string $direction
     * @return \Illuminate\Database\Eloquent\Builder
     */
    public function scopeOrderByStartDate($query, string $direction = 'desc')
    {
        return $query->orderBy('employment_start_date', $direction);
    }

    /**
     * Get the passport URL for display or download.
     *
     * @return string|null
     */
    public function getPassportUrl(): ?string
    {
        if (!$this->passport_path) {
            return null;
        }

        return \Illuminate\Support\Facades\Storage::disk('public')->url($this->passport_path);
    }

    /**
     * Check if staff member has a passport file.
     *
     * @return bool
     */
    public function hasPassport(): bool
    {
        return !is_null($this->passport_path) && \Illuminate\Support\Facades\Storage::disk('public')->exists($this->passport_path);
    }

    /**
     * Delete the passport file from storage.
     *
     * @return bool
     */
    public function deletePassport(): bool
    {
        if (!$this->passport_path) {
            return false;
        }

        if (\Illuminate\Support\Facades\Storage::disk('public')->exists($this->passport_path)) {
            \Illuminate\Support\Facades\Storage::disk('public')->delete($this->passport_path);
        }

        $this->passport_path = null;
        return $this->save();
    }

    /**
     * The "deleting" event handler.
     */
    protected static function booting(): void
    {
        parent::booting();

        static::deleting(function (StaffHistory $staff) {
            // Delete passport file when record is deleted
            if ($staff->passport_path && \Illuminate\Support\Facades\Storage::disk('public')->exists($staff->passport_path)) {
                \Illuminate\Support\Facades\Storage::disk('public')->delete($staff->passport_path);
            }
        });
    }
}
