presseportale/dev/_old/Models/PromotionLink.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

59 lines
1.7 KiB
PHP

<?php
/**
* Created by Reliese Model.
*/
namespace App\Models;
use Illuminate\Database\Eloquent\Collection;
use Illuminate\Database\Eloquent\Model;
/**
* Class PromotionLink
*
* @property int $id
* @property string $title
* @property string $link
* @property string $language
* @property int|null $show_on_homepage
* @property int|null $press_release_id
* @property Collection|Category[] $categories
* @property-read int|null $categories_count
*
* @method static \Illuminate\Database\Eloquent\Builder|PromotionLink newModelQuery()
* @method static \Illuminate\Database\Eloquent\Builder|PromotionLink newQuery()
* @method static \Illuminate\Database\Eloquent\Builder|PromotionLink query()
* @method static \Illuminate\Database\Eloquent\Builder|PromotionLink whereId($value)
* @method static \Illuminate\Database\Eloquent\Builder|PromotionLink whereLanguage($value)
* @method static \Illuminate\Database\Eloquent\Builder|PromotionLink whereLink($value)
* @method static \Illuminate\Database\Eloquent\Builder|PromotionLink wherePressReleaseId($value)
* @method static \Illuminate\Database\Eloquent\Builder|PromotionLink whereShowOnHomepage($value)
* @method static \Illuminate\Database\Eloquent\Builder|PromotionLink whereTitle($value)
*
* @mixin \Eloquent
*/
class PromotionLink extends Model
{
protected $table = 'promotion_link';
public $timestamps = false;
protected $casts = [
'show_on_homepage' => 'int',
'press_release_id' => 'int',
];
protected $fillable = [
'title',
'link',
'language',
'show_on_homepage',
'press_release_id',
];
public function categories()
{
return $this->belongsToMany(Category::class, 'promotion_link_category');
}
}