Skip to content

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#

MethodDescription
->__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)
ParameterTypeDescription
$resultRenderedDocument

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
ParameterTypeDescription
$filename?string = null
Returns
Symfony\Component\HttpFoundation\Response

filename()#

public function filename(?string $extension = null): string
ParameterTypeDescription
$extension?string = null
Returns
string

hasPdf()#

public function hasPdf(): bool

Whether 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): string

Stores the main output on a filesystem disk (default: quittio.storage.disk).

ParameterTypeDescription
$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
ParameterTypeDescription
$filename?string = null
Returns
Symfony\Component\HttpFoundation\Response

toMailAttachment()#

public function toMailAttachment(): Attachment
Returns
Illuminate\Mail\Attachment

toResponse()#

public function toResponse(Request $request): Response
ParameterTypeDescription
$requestIlluminate\Http\Request
Returns
Symfony\Component\HttpFoundation\Response

The open core packages are MIT licensed. The legal wording of the country packs must be confirmed by a tax adviser.