class Report extends Model

Traits

HasFactory

Properties

protected ReportGenerator $reportGenerator

The report generator for this report.

Methods

array
casts()

Get the attributes that should be cast.

BelongsTo
user()

The user that requested the report.

BelongsTo
type()

Type of the report.

Project|Volume, $this>
source()

Source of the report.

string
getSourceNameAttribute()

Get the source name dynamically if the source still exists.

setReportGenerator(ReportGenerator $generator)

Set the report generator for this model.

getReportGenerator()

Get the report generator for this report;.

generate()

Generate the report file for this report.

string
getSubjectAttribute()

Get the subject for this report.

string
getNameAttribute()

Get the name for this report.

string
getFilenameAttribute()

Get the filename for this report.

string
getUrl()

Get the URL to download the report.

deleteFile()

Delete the file that belongs to this report.

string
getStorageFilename()

Get the filename of the report in storage (not the filename for download).

Details

at line 34
protected array casts()

Get the attributes that should be cast.

Return Value

array

at line 50
BelongsTo user()

The user that requested the report.

Return Value

BelongsTo

at line 60
BelongsTo type()

Type of the report.

Return Value

BelongsTo

at line 70
Project|Volume, $this> source()

Source of the report.

Return Value

Project|Volume, $this>

at line 83
string getSourceNameAttribute()

Get the source name dynamically if the source still exists.

Return Value

string

at line 97
setReportGenerator(ReportGenerator $generator)

Set the report generator for this model.

Parameters

ReportGenerator $generator

at line 107
ReportGenerator getReportGenerator()

Get the report generator for this report;.

Return Value

ReportGenerator

at line 119
generate()

Generate the report file for this report.

at line 135
string getSubjectAttribute()

Get the subject for this report.

Return Value

string

at line 147
string getNameAttribute()

Get the name for this report.

Return Value

string

at line 157
string getFilenameAttribute()

Get the filename for this report.

Return Value

string

at line 167
string getUrl()

Get the URL to download the report.

Return Value

string

at line 175
deleteFile()

Delete the file that belongs to this report.

at line 185
string getStorageFilename()

Get the filename of the report in storage (not the filename for download).

Return Value

string