O'Reilly logo

PHP 5 Social Networking by Michael Peacock

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Groups

Now that we have functionality for groups in place, we need a facility to allow our users to be able to find and join groups. After all, if users can't find groups then there isn't much point in them being there. This can be enabled through two methods:

  • Listing groups (where they are public)
  • Searching groups (again, where they are public)

To facilitate this, we will need a new model and a new controller: groups. This will manage the listing and searching of groups.

Listing groups

Let's look at how we can list public groups, and also list our own group memberships to make it possible to find groups and easily access groups we are members of.

Group controller addition

We need to complete a method we referenced earlier in the chapter, to list public ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required