<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Builder;
use Illuminate\Database\Eloquent\Model;

class WhatWeDoImage extends Model
{
    protected $fillable = [
        'slot',
        'card_title',
        'image_path',
    ];

    protected $casts = [
        'slot' => 'integer',
    ];

    /**
     * Scope: order records by slot ascending.
     */
    public function scopeOrdered(Builder $query): Builder
    {
        return $query->orderBy('slot', 'asc');
    }
}
