You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
willaengine/app/Help.php

25 lines
597 B

<?php
namespace App;
use Illuminate\Database\Eloquent\Model;
class Help extends Model
{
protected $fillable=['title_fa','title_en','text','help_category_id'];
public function help_category()
{
return $this->belongsTo('App\HelpCategory','help_category_id');
}
public function tiny_images()
{
return $this->morphToMany('App\Gallery', 'uploadable')->wherePivot('image_role', 'TinyImages')->where('parent_id', null);
}
public function images()
{
return $this->morphToMany('App\Gallery', 'uploadable')->where('parent_id', null);
}
}