\Upload

Model for representation of uploaded files

Summary

Methods
Properties
Constants
user()
result()
name()
filesize()
delTree()
No public properties found
No constants found
No protected methods found
$table
$softDelete
$fillable
N/A
No private methods found
No private properties found
N/A

Properties

$table

$table : string

String containing the database table

Type

string

$softDelete

$softDelete : boolean

Controlling soft delete

Type

boolean

$fillable

$fillable : array

Array with fillable fields

Type

array

Methods

user()

user() : \User

Function to retrieve associated upload

Returns

\User

The user model associated

result()

result() : \Result

Function to retrieve associated result

Returns

\Result

The result model associated

name()

name() : string

Function to get the file name

Returns

string —

The filename

filesize()

filesize() : string

Function to get the filesize

Returns

string —

The filesize

delTree()

delTree(  $dir) : boolean

Function to recursively remove a directory

Parameters

$dir

Returns

boolean —

Returns false if operation fails