<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Model;

class EventImage extends Model
{
    protected $fillable = ['event_id','path','original_name','order'];

    public function event()
    {
        return $this->belongsTo(Event::class);
    }

    public function url(): string
    {
        return asset('storage/'.$this->path);
    }
}
