presseportale/dev/Models/Category.php
Kevin Adametz 405df0a122
Some checks failed
linter / quality (push) Has been cancelled
tests / ci (push) Has been cancelled
first commit
2025-10-20 17:53:02 +02:00

55 lines
1.5 KiB
PHP

<?php
/**
* Created by Reliese Model.
*/
namespace App\Models;
use Illuminate\Database\Eloquent\Collection;
use Illuminate\Database\Eloquent\Model;
/**
* Class Category
*
* @property int $id
* @property Collection|FooterCode[] $footer_codes
* @property Collection|CategoryTranslation[] $category_translations
* @property Collection|PressRelease[] $press_releases
* @property Collection|PromotionLink[] $promotion_links
* @package App\Models
* @property-read int|null $category_translations_count
* @property-read int|null $footer_codes_count
* @property-read int|null $press_releases_count
* @property-read int|null $promotion_links_count
* @method static \Illuminate\Database\Eloquent\Builder|Category newModelQuery()
* @method static \Illuminate\Database\Eloquent\Builder|Category newQuery()
* @method static \Illuminate\Database\Eloquent\Builder|Category query()
* @method static \Illuminate\Database\Eloquent\Builder|Category whereId($value)
* @mixin \Eloquent
*/
class Category extends Model
{
protected $table = 'category';
public $timestamps = false;
public function footer_codes()
{
return $this->belongsToMany(FooterCode::class);
}
public function category_translations()
{
return $this->hasMany(CategoryTranslation::class, 'id');
}
public function press_releases()
{
return $this->hasMany(PressRelease::class);
}
public function promotion_links()
{
return $this->belongsToMany(PromotionLink::class, 'promotion_link_category');
}
}