Legal Pages in Laravel

13th March 2014 | Tags:

Most sites have pages for Terms and Con­di­tions, a Pri­vacy pol­icy and /​or a page about cook­ies. Pre­sum­ably they are usu­ally tucked away in a CMS some­where, or as sta­tic HTML — no doubt copied & pasted ver­ba­tim from the Inter­net. Whether the CMS is the nat­ural place for them remains to be seen, and cer­tainly if a site doesn’t have con­tent as such then sup­port­ing those sorts of pages intro­duces new prob­lems — is the con­tent sim­ply dropped into a view somewhere?

To help solve this prob­lem — in Lar­avel 4, specif­i­cally — I’ve cre­ated a sim­ple pack­age called Legal­pages. The idea behind it is sim­ple — you install it, enter a few pieces of infor­ma­tion about your busi­ness or organ­i­sa­tion in a con­fig­u­ra­tion file — and done, your site now has Terms and Con­di­tions, Pri­vacy and cookie pages. I’ve used some boil­er­plate doc­u­ments, which get tai­lored accord­ing to the infor­ma­tion you pro­vide, but you can cus­tomise them if you wish — they wind up in your app/storage direc­tory in Mark­down for­mat for easy editing.

The sam­ple doc­u­ments are UK-​focussed (in fact, more Eng­land & Wales since some of the laws in ques­tion dif­fer slightly up in Scot­land) — but if there’s enough demand, I’ll look at expand­ing the pack­age to sup­port other coun­tries. Of course you can still use the pack­age, just mod­ify the Mark­down files.

The code is on Github, or you can install it using Composer:

"lukaswhite/legalpages" : "dev-master"

Check out the README for more detailed instructions.


No comments yet.

Links and images are allowed, but please note that rel="nofollow" will be automactically appended to any links.