feat: implement tenant management system with attachment support and bootstrap controller
This commit is contained in:
@@ -48,4 +48,15 @@ class Attachment extends Model
|
||||
{
|
||||
return $this->hasMany(AttachableAttachment::class, 'attachment_id');
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the pre-signed temporary S3 URL for this attachment.
|
||||
*/
|
||||
public function getTemporaryUrl(int $expiresInMinutes = 10): string
|
||||
{
|
||||
return \Illuminate\Support\Facades\Storage::disk('s3')->temporaryUrl(
|
||||
$this->path,
|
||||
now()->addMinutes($expiresInMinutes)
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user