feat: implement tenant management system with attachment support and bootstrap controller

This commit is contained in:
2026-06-26 13:17:48 -03:00
parent 1f9d876bc3
commit 54aa696145
9 changed files with 198 additions and 52 deletions

View File

@@ -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)
);
}
}