public function hasMany(Model $related)
    {
        $table = ucfirst($related->getTable());
        $column = "shared{$table}List";
        $this->bean->$column[] = $related->getBean();
    }
public function hasMany(Model $related)
    {
        $table = ucfirst($related->getTable());
        $column = "shared{$table}List";
        $this->bean->$column[] = $related->getBean();
    }
public function hasMany ( Model $ related ) { $ table = ucfirst ( $ related -> getTable ( ) ) ; $ column = "shared{$table}List" ; $ this -> bean -> $ column [ ] = $ related -> getBean ( ) ; }
Create many-to-many relationship
@param Model $related
Create many - to - many relationship