Help with folding table legs

Has anyone made a folding table? I am looking to build a folding table but I am having trouble figuring out the hinges for the legs, does anyone have any experience or ideas for this? Thanks

2 replies