PHP Class MediaEntry, Doptor

Inheritance: extends Eloquent, implements Robbo\Presenter\PresentableInterface
Mostrar archivo Open project: doptor/doptor

Public Properties

Property Type Description
$images_path Path in the public folder to upload image and its corresponding thumbnail
$rules
$thumbs_path

Protected Properties

Property Type Description
$guarded
$table

Public Methods

Method Description
create ( array $attributes = [] ) : void When creating a post, run the attributes through a validator first.
getImageAttribute ( ) : string Get the image with its directory location
getPresenter ( ) Initiate the presenter class
getThumbnailAttribute ( ) : string Get the thumbnail with its directory location
setImageAttribute ( $file ) Upload the image while creating/updating records
update ( array $attributes = [], array $options = [] ) : void When updating a post, run the attributes through a validator first.

Method Details

create() public static method

When creating a post, run the attributes through a validator first.
public static create ( array $attributes = [] ) : void
$attributes array
return void

getImageAttribute() public method

Get the image with its directory location
public getImageAttribute ( ) : string
return string

getPresenter() public method

Initiate the presenter class
public getPresenter ( )

getThumbnailAttribute() public method

Get the thumbnail with its directory location
public getThumbnailAttribute ( ) : string
return string

setImageAttribute() public method

Upload the image while creating/updating records
public setImageAttribute ( $file )

update() public method

When updating a post, run the attributes through a validator first.
public update ( array $attributes = [], array $options = [] ) : void
$attributes array
$options array
return void

Property Details

$guarded protected_oe property

protected $guarded

$images_path public_oe property

Path in the public folder to upload image and its corresponding thumbnail
public $images_path

$rules public_oe static_oe property

public static $rules

$table protected_oe property

protected $table

$thumbs_path public_oe property

public $thumbs_path