<?php namespace BookStack;
-
class Attachment extends Ownable
{
protected $fillable = ['name', 'order'];
*/
public function getFileName()
{
- if (str_contains($this->name, '.')) return $this->name;
+ if (str_contains($this->name, '.')) {
+ return $this->name;
+ }
return $this->name . '.' . $this->extension;
}
{
return baseUrl('/attachments/' . $this->id);
}
-
}