I was developing a project, with voyager. I have this table news. So I created a model New.php. Everything is working like a charm.
Our client would like to relate and show, news, to other similar news. So there's a problem. How to work and manage with circular references and many to many relationship?
class New extends Model
{
public function relatedNews(){
return $this->belongsTo('App\New', 'table_news_related', 'base_news_id', 'related_news_id');
}
}