Here is two of my beds

These 4'X8'X12" beds are made of one sheet of 3/4" plywood with 2"x12" sides and sealed with Elasto-Seal From
Snow Roof Systems.

They are filled with pea gravel. The Water is pumped through the 1" pvc grid With 1/8" holes in the bottom about 1'' a part.

To make the drain I used an 1 1/2" pvc 90 and 1 1 1/4" bushing. I driole a hole in the bottom of the bed in the center of the end near my fish tank about 6" from the end. I pushed the bushing theough the hole and sealed it with Silicone Rubber Sealant.
Then I glued the 1 1/2" 90 to bushing on the bottom side. I took a piece of 1 1/4" pvc baout 14" lond and drilled 3/16" holes about 1/4" apart all over it to make the stand pipe and stuck it in the bushing (NO glue).

Then I glued another busging in the other end of the 2" 90 and an 1 1/4" piece of pvc 6" long in it with a male thread adapter.
On that I put a pvc 1 1/4" ball valve with another piece of 1 1/4" pvc long enough to rech over my tank with thread adapters on each end. On the outer end I put a screw on cap with 3/16" holes deilled in it to make it like a shower head.