Zum Inhalt springen

API reference / Quittio \ Laravel \ Rendering

DeliversFile

trait in quittio/laravel

Quittio\Laravel\Rendering\DeliversFile · Source

Download, inline display, mail attachment and storage for rendered files.

Methods#

MethodDescription
->contents()
->download()
->filename()
->mimeType()
->save()Stores the main output on a filesystem disk (default: quittio.storage.disk).
->stream()
->toMailAttachment()
->toResponse()

contents()#

abstract public function contents(): string

abstract

Returns
string

download()#

public function download(?string $filename = null): Response
ParameterTypeDescription
$filename?string = null
Returns
Symfony\Component\HttpFoundation\Response

filename()#

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

abstract

ParameterTypeDescription
$extension?string = null
Returns
string

mimeType()#

abstract public function mimeType(): string

abstract

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

Die Open-Core-Pakete stehen unter der MIT-Lizenz. Die rechtlichen Formulierungen der Länderpakete sind mit einer Steuerberatung abzustimmen.