PHP Class Corcel\PostMeta

Inheritance: extends Model
ファイルを表示 Open project: jgrossi/corcel Class Usage Examples

Public Properties

Property Type Description
$timestamps

Protected Properties

Property Type Description
$appends array The accessors to append to the model's array form.
$fillable
$primaryKey
$table

Public Methods

Method Description
getValueAttribute ( ) : value Gets the value.
newCollection ( array $models = [] ) : PostMetaCollection Override newCollection() to return a custom collection
post ( $ref = false ) : BelongsTo Post relationship
taxonomy ( $primary = null, $where = null ) : Illuminate\Database\Eloquent\Relations\Relation Taxonomy relationship from the meta_value.

Method Details

getValueAttribute() public method

Tries to unserialize the object and returns the value if that doesn't work.
public getValueAttribute ( ) : value
return value

newCollection() public method

Override newCollection() to return a custom collection
public newCollection ( array $models = [] ) : PostMetaCollection
$models array
return PostMetaCollection

post() public method

Post relationship
public post ( $ref = false ) : BelongsTo
return Illuminate\Database\Eloquent\Relations\BelongsTo

taxonomy() public method

Taxonomy relationship from the meta_value.
public taxonomy ( $primary = null, $where = null ) : Illuminate\Database\Eloquent\Relations\Relation
return Illuminate\Database\Eloquent\Relations\Relation

Property Details

$appends protected_oe property

The accessors to append to the model's array form.
protected array $appends
return array

$fillable protected_oe property

protected $fillable

$primaryKey protected_oe property

protected $primaryKey

$table protected_oe property

protected $table

$timestamps public_oe property

public $timestamps