Constants

STORAGE_DIR

STORAGE_DIR

Image storage location

SIZES

SIZES

Size definitions

ORIGINAL_SIZE

ORIGINAL_SIZE

Original size key name

ORIGINAL_SIZE_LIMIT

ORIGINAL_SIZE_LIMIT

Max width/height in px

Properties

$id

$id : integer

Type

integer

$created_at

$created_at : \Carbon\Carbon|null

Type

\Carbon\Carbon|null

$updated_at

$updated_at : \Carbon\Carbon|null

Type

\Carbon\Carbon|null

$original

$original : string|null

Type

string|null

$sizes

$sizes : array

Type

array

$available_sizes

$available_sizes : array

If null, all sizes will be created

Type

array

$ready

$ready : boolean

Type

boolean

$width

$width : integer

Type

integer

$height

$height : integer

Type

integer

$order

$order : integer

Type

integer

$offer_id

$offer_id : integer|null

Type

integer|null

$absolute_paths

$absolute_paths : array<mixed,string>

Type

array<mixed,string>

$all_sizes

$all_sizes : array<mixed,string>

Type

array<mixed,string>

$urls

$urls : array<mixed,string>

Type

array<mixed,string>

$offer

$offer : \App\Offer|null

Type

\App\Offer|null

$user

$user : \App\User

Type

\App\User

$casts

$casts : 

Type

$fillable

$fillable : 

Type

Methods

offer()

offer() : \Illuminate\Database\Eloquent\Relations\BelongsTo

Offer relation

Returns

\Illuminate\Database\Eloquent\Relations\BelongsTo

user()

user() : \Illuminate\Database\Eloquent\Relations\HasOne

Profile image owner relation

Returns

\Illuminate\Database\Eloquent\Relations\HasOne

scopeDisplayable()

scopeDisplayable(\Illuminate\Database\Eloquent\Builder  $query) : \Illuminate\Database\Eloquent\Builder

Return only images that can be displayed

Parameters

\Illuminate\Database\Eloquent\Builder $query

Returns

\Illuminate\Database\Eloquent\Builder

getAllSizesAttribute()

getAllSizesAttribute() : array<mixed,string>

Array combining `sizes` and `original`

Returns

array<mixed,string>

getUrlsAttribute()

getUrlsAttribute() : array<mixed,string>

Array of image URLs

Returns

array<mixed,string>

getAbsolutePathsAttribute()

getAbsolutePathsAttribute() : array<mixed,string>

Array of image absolute paths

Returns

array<mixed,string>

displayable()

displayable() : \Illuminate\Database\Eloquent\Builder|\App\Image

Returns

\Illuminate\Database\Eloquent\Builder|\App\Image

whereAvailableSizes()

whereAvailableSizes(mixed  $value) : \Illuminate\Database\Eloquent\Builder|\App\Image

Parameters

mixed $value

Returns

\Illuminate\Database\Eloquent\Builder|\App\Image

whereCreatedAt()

whereCreatedAt(mixed  $value) : \Illuminate\Database\Eloquent\Builder|\App\Image

Parameters

mixed $value

Returns

\Illuminate\Database\Eloquent\Builder|\App\Image

whereHeight()

whereHeight(mixed  $value) : \Illuminate\Database\Eloquent\Builder|\App\Image

Parameters

mixed $value

Returns

\Illuminate\Database\Eloquent\Builder|\App\Image

whereId()

whereId(mixed  $value) : \Illuminate\Database\Eloquent\Builder|\App\Image

Parameters

mixed $value

Returns

\Illuminate\Database\Eloquent\Builder|\App\Image

whereOfferId()

whereOfferId(mixed  $value) : \Illuminate\Database\Eloquent\Builder|\App\Image

Parameters

mixed $value

Returns

\Illuminate\Database\Eloquent\Builder|\App\Image

whereOrder()

whereOrder(mixed  $value) : \Illuminate\Database\Eloquent\Builder|\App\Image

Parameters

mixed $value

Returns

\Illuminate\Database\Eloquent\Builder|\App\Image

whereOriginal()

whereOriginal(mixed  $value) : \Illuminate\Database\Eloquent\Builder|\App\Image

Parameters

mixed $value

Returns

\Illuminate\Database\Eloquent\Builder|\App\Image

whereReady()

whereReady(mixed  $value) : \Illuminate\Database\Eloquent\Builder|\App\Image

Parameters

mixed $value

Returns

\Illuminate\Database\Eloquent\Builder|\App\Image

whereSizes()

whereSizes(mixed  $value) : \Illuminate\Database\Eloquent\Builder|\App\Image

Parameters

mixed $value

Returns

\Illuminate\Database\Eloquent\Builder|\App\Image

whereUpdatedAt()

whereUpdatedAt(mixed  $value) : \Illuminate\Database\Eloquent\Builder|\App\Image

Parameters

mixed $value

Returns

\Illuminate\Database\Eloquent\Builder|\App\Image

whereWidth()

whereWidth(mixed  $value) : \Illuminate\Database\Eloquent\Builder|\App\Image

Parameters

mixed $value

Returns

\Illuminate\Database\Eloquent\Builder|\App\Image

boot()

boot()