first commit
This commit is contained in:
commit
405df0a122
3083 changed files with 69203 additions and 0 deletions
55
dev/Models/Category.php
Normal file
55
dev/Models/Category.php
Normal file
|
|
@ -0,0 +1,55 @@
|
|||
<?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');
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue