<?php

namespace App\Models;

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

class Banner extends Model
{
    protected $fillable = ['image_path', 'title', 'caption', 'sort_order'];

    public function getUrlAttribute(): string
    {
        return Storage::url($this->image_path);
    }

    protected $appends = ['url'];
}
