Take a stud finder and locate the studs in the wall where you want to mount the table. Mark where the studs are with a pencil.
Position two hinged shelf brackets against the wall on top of the studs. Space the brackets 2 feet apart or as evenly as possible. Use a level to make sure the top of the brackets are even; otherwise, you'll end up with a crooked table top.
Locate the four holes on the vertical part of each hinged bracket. Mark where each hole is on the wall with the pencil.
Drill a hole at each mark. The hole should be as wide as the wall anchors you are using. Push an anchor into each hole.
Reposition the brackets against the wall and line up the holes of the brackets with the holes in the wall. Attach a screwdriver bit to the drill then secure the hinged brackets to the wall with 2-inch screws.
Set a wood countertop on the horizontal portion of the hinged brackets. Center the counter so that it hangs evenly from the brackets.
Attach the countertop to the hinges with four 1-inch screws into the holes on the horizontal side of each bracket.
Push on the lever on the underside of the hinged brackets to flatten the table against the wall.