API reference / Quittio \ Laravel \ Rendering
RenderedDocument
final class in quittio/laravel · implements Illuminate\Contracts\Mail\Attachable, Illuminate\Contracts\Support\Responsable · uses DeliversFile
Quittio\Laravel\Rendering\RenderedDocument · Source
Rendered quote, delivery note, reminder or statement for Laravel.
Methods#
| Method | Description |
|---|---|
->__construct() | |
->contents() | |
->core() | |
->data() | |
->download() | |
->filename() | |
->hasPdf() | Whether a PDF was rendered (false after htmlOnly()). |
->html() | |
->mimeType() | |
->notices() | Plausibility hints on the document, e.g. a reminder that claims reminder fees besides the flat rate (see Quittio\Core\Documents\DocumentData::notices()). |
->pdf() | |
->save() | Stores the main output on a filesystem disk (default: quittio.storage.disk). |
->stream() | |
->toMailAttachment() | |
->toResponse() |
__construct()#
public function __construct(RenderedDocument $result)| Parameter | Type | Description |
|---|---|---|
$result | RenderedDocument |
contents()#
public function contents(): string- Returns
string
core()#
public function core(): RenderedDocument- Returns
RenderedDocument
data()#
public function data(): DocumentData- Returns
DocumentData
download()#
public function download(?string $filename = null): Response| Parameter | Type | Description |
|---|---|---|
$filename | ?string = null |
- Returns
Symfony\Component\HttpFoundation\Response
filename()#
public function filename(?string $extension = null): string| Parameter | Type | Description |
|---|---|---|
$extension | ?string = null |
- Returns
string
hasPdf()#
public function hasPdf(): boolWhether a PDF was rendered (false after htmlOnly()).
- Returns
bool
html()#
public function html(): string- Returns
string
mimeType()#
public function mimeType(): string- Returns
string
notices()#
public function notices(): list<ValidationMessage>Plausibility hints on the document, e.g. a reminder that claims reminder fees besides the flat rate (see Quittio\Core\Documents\DocumentData::notices()).
- Returns
list<ValidationMessage>
pdf()#
public function pdf(): string- Returns
string
save()#
public function save(?string $disk = null, ?string $path = null): stringStores the main output on a filesystem disk (default: quittio.storage.disk).
| Parameter | Type | Description |
|---|---|---|
$disk | ?string = null | |
$path | ?string = null |
- Returns
string– the stored path- Throws
RuntimeException– when the disk does not store the file
stream()#
public function stream(?string $filename = null): Response| Parameter | Type | Description |
|---|---|---|
$filename | ?string = null |
- Returns
Symfony\Component\HttpFoundation\Response
toMailAttachment()#
public function toMailAttachment(): Attachment- Returns
Illuminate\Mail\Attachment
toResponse()#
public function toResponse(Request $request): Response| Parameter | Type | Description |
|---|---|---|
$request | Illuminate\Http\Request |
- Returns
Symfony\Component\HttpFoundation\Response