presseportale/dev/_old/Models/FooterCode.php

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 FooterCode
*
* @property int $id
* @property string $title
* @property string|null $content
* @property string|null $language
* @property int $is_global
* @property Collection|Category[] $categories
* @property-read int|null $categories_count
*
* @method static \Illuminate\Database\Eloquent\Builder|FooterCode newModelQuery()
* @method static \Illuminate\Database\Eloquent\Builder|FooterCode newQuery()
* @method static \Illuminate\Database\Eloquent\Builder|FooterCode query()
* @method static \Illuminate\Database\Eloquent\Builder|FooterCode whereContent($value)
* @method static \Illuminate\Database\Eloquent\Builder|FooterCode whereId($value)
* @method static \Illuminate\Database\Eloquent\Builder|FooterCode whereIsGlobal($value)
* @method static \Illuminate\Database\Eloquent\Builder|FooterCode whereLanguage($value)
* @method static \Illuminate\Database\Eloquent\Builder|FooterCode whereTitle($value)
*
* @mixin \Eloquent
*/
class FooterCode extends Model
{
protected $table = 'footer_code';
public $timestamps = false;
protected $casts = [
'is_global' => 'int',
];
protected $fillable = [
'title',
'content',
'language',
'is_global',
];
public function categories()
{
return $this->belongsToMany(Category::class);
}
}