presseportale/dev/_old/Models/Category.php
Kevin Adametz 5b8bdf4182
Some checks are pending
linter / quality (push) Waiting to run
tests / ci (push) Waiting to run
12-05-2026 Frontend dev
2026-05-12 18:32:33 +02:00

57 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
* @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');
}
}