belongsTo(User::class); } public function getUrlAttribute() { return asset('storage/' . $this->path); } // Make sure the URL is included when serializing protected $appends = ['url']; }