public function menuPivot()
    {
        return $this->getConnection()->table('widget_menu')
                    ->where('widget_id', $this->id)
                    ->orWhere(function ($query) {
                        $query->where('menu_id', 0)
                              ->where('widget_id', $this->id);
                    });
    }
public function menuPivot()
    {
        return $this->getConnection()->table('widget_menu')
                    ->where('widget_id', $this->id)
                    ->orWhere(function ($query) {
                        $query->where('menu_id', 0)
                              ->where('widget_id', $this->id);
                    });
    }
public function menuPivot ( ) { return $ this -> getConnection ( ) -> table ( 'widget_menu' ) -> where ( 'widget_id' , $ this -> id ) -> orWhere ( function ( $ query ) { $ query -> where ( 'menu_id' , 0 ) -> where ( 'widget_id' , $ this -> id ) ; } ) ; }
Get related menus.

@return \Illuminate\Database\Eloquent\Builder
Get related menus .