PHP Class app\models\Post

Inheritance: extends Illuminate\Database\Eloquent\Model
Show file Open project: forehalo/materialize-blog Class Usage Examples

Protected Properties

Property Type Description
$fillable
$table string Table name

Public Methods

Method Description
category ( ) : BelongsTo One to many relation.
comments ( ) : Illuminate\Database\Eloquent\Relations\HasMany One to many relation.
tags ( ) : Illuminate\Database\Eloquent\Relations\BelongsToMany Many to many relation.

Method Details

category() public method

One to many relation.
public category ( ) : BelongsTo
return Illuminate\Database\Eloquent\Relations\BelongsTo

comments() public method

One to many relation.
public comments ( ) : Illuminate\Database\Eloquent\Relations\HasMany
return Illuminate\Database\Eloquent\Relations\HasMany

tags() public method

Many to many relation.
public tags ( ) : Illuminate\Database\Eloquent\Relations\BelongsToMany
return Illuminate\Database\Eloquent\Relations\BelongsToMany

Property Details

$fillable protected property

protected $fillable

$table protected property

Table name
protected string $table
return string