PHP Class app\models\News

Inheritance: extends App\Model
Afficher le fichier Open project: qloog/laravel5-backend Class Usage Examples

Protected Properties

Свойство Type Description
$fillable array The attributes that are mass assignable.
$hidden array The attributes excluded from the model's JSON form.
$table string The table associated with the model.

Méthodes publiques

Méthode Description
category ( ) Get the category that owns the news.
getPageImageAttribute ( $value )
syncTags ( array $tags ) Sync tag relation adding new tags as needed
tags ( ) : BelongsToMany The many-to-many relationship between news and tags.
user ( ) : BelongsToMany The one-to-one relationship between news and users.

Method Details

category() public méthode

The one-to-one relationship between news and category.
public category ( )

getPageImageAttribute() public méthode

public getPageImageAttribute ( $value )

syncTags() public méthode

Sync tag relation adding new tags as needed
public syncTags ( array $tags )
$tags array

tags() public méthode

The many-to-many relationship between news and tags.
public tags ( ) : BelongsToMany
Résultat BelongsToMany

user() public méthode

The one-to-one relationship between news and users.
public user ( ) : BelongsToMany
Résultat BelongsToMany

Property Details

$fillable protected_oe property

The attributes that are mass assignable.
protected array $fillable
Résultat array

$hidden protected_oe property

The attributes excluded from the model's JSON form.
protected array $hidden
Résultat array

$table protected_oe property

The table associated with the model.
protected string $table
Résultat string