Composer Cheat Sheet for developers
Category: Web work
These days, most of my work is very related to the online world. Building web sites, reviewing web applications, integrating with web services, coordinating people who are far away from each other, etc. Whenever I find a new tool or service or an innovative, interesting idea about working online, I share it in this category.
Composer for PHP dependency management
I am reading about Composer. Â And the more I read, the more I like it.
Faker is a PHP library that generates fake data
Faker is a PHP library that generates fake data
Only 90s Web Developers Remember This
Only 90s Web Developers Remember This
Have you ever shoved aÂ
<blink>Â into aÂ<marquee>Â tag? Pixar gets all the accolades today, but in the 90s this was a serious feat of computer animation. By combining these two tags, you were a trailblazer. A person capable of great innovation. A human being that all other human beings could aspire to.You were a web developer in the 1990s.
There are more nostalgic examples of how we used to do things back in the day …
Searching CakePHP pages
CakePHP framework comes with the default PagesController which is an awesome out of the box way to build a website of mostly static pages. Â There is one rather annoying limitation though – no search option. Â If you need a website of mostly static pages with search functionality, you are out of luck. Â I spent a good chunk of time Googling (searching, eh?) for a solution and even talking to people in #cakephp IRC channel. Â The best alternatives, it turned out are listed in this StackOverflow answer:
There is no built in way to search static pages as they are just files on disk.
You have three options
- Build a model to hold the data somewhat like a CMS so you can use mysql search.
- google search for sites
- the more hacky approach of reading the contents of all the pages and using preg_match() or similar on the contents to find matches.
The first option is probably the best depending on your use case. The second option is the easiest if its public facing content. The third option is a horrible idea
Since I need the solution for a public facing website, it looks like I’m gonna go with Google Custom Search Engine option.