Skip to content

Instantly share code, notes, and snippets.

@JamesTheHacker
Created December 8, 2016 11:57
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save JamesTheHacker/a43a7cb302b1953d0e861ff6dc13e1b5 to your computer and use it in GitHub Desktop.
Save JamesTheHacker/a43a7cb302b1953d0e861ff6dc13e1b5 to your computer and use it in GitHub Desktop.
class GroupRepository
{
private $groupModel;
public function __construct(Group $groupModel)
{
$this->groupModel = $groupModel;
}
public function create($creatorID, $image, $name, $description)
{
$this->groupModel->creator_id = $creatorID;
$this->groupModel->image = $image;
$this->groupModel->name = $name;
$this->groupModel->description = $description;
$this->groupModel->save();
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment