regarding the first part of your question polymorphic relations are the way to go. You create Game and Gamer model and they will both need to be "groupable" type of which will be determined by the "groupable_type" field. In the above case you use 3 tables - for Gamer, Game and the poly Group table.
//example table structure
CREATE TABLE `group` (
`id` int(11) unsigned NOT NULL AUTO_INCREMENT,
`title` varchar(255) NOT NULL,
`description` varchar(255) NOT NULL,
`groupable_id` int(11) unsigned NOT NULL,
`groupable_type` varchar(255) NOT NULL,
`created_at` datetime NOT NULL,
`updated_at` datetime NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;
//app/models/Group.php
class Group extends Eloquent {
protected $table = 'group';
public function groupable()
{
return $this->morphTo();
}
}
//app/model/Gamer.php
class Gamer extends Eloquent
{
...
public function group()
{
return $this->morphMany('Group', 'groupable');
}
...
}
//app/model/Game.php
class Game extends Eloquent
{
...
public function group()
{
return $this->morphMany('Group', 'groupable');
}
...
}
As for the other models, that would be related to groups it's the same case - you can work the magic and also make them "groupable" which will enable you to just store all the group details in one table.
//app/model/News.php
class News extends Eloquent
{
...
public function group()
{
return $this->morphMany('Group', 'groupable');
}
...
}