40 lines
847 B
PHP
40 lines
847 B
PHP
<?php
|
|
|
|
namespace App\Models;
|
|
|
|
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
|
use Illuminate\Database\Eloquent\Model;
|
|
use Illuminate\Database\Eloquent\Relations\BelongsToMany;
|
|
use Illuminate\Database\Eloquent\Relations\HasMany;
|
|
|
|
class Channel extends Model
|
|
{
|
|
use HasFactory;
|
|
|
|
protected $fillable = [
|
|
'name',
|
|
'hostname',
|
|
'locale',
|
|
'taxonomy_slug',
|
|
'template',
|
|
'meta_title',
|
|
'meta_description',
|
|
'meta_keywords',
|
|
'og_image',
|
|
];
|
|
|
|
public function prefixes(): BelongsToMany
|
|
{
|
|
return $this->belongsToMany(Prefix::class);
|
|
}
|
|
|
|
public function publications(): HasMany
|
|
{
|
|
return $this->hasMany(Publication::class);
|
|
}
|
|
|
|
public function taxonomyTerms(): HasMany
|
|
{
|
|
return $this->hasMany(TaxonomyTerm::class);
|
|
}
|
|
}
|