Archive for the ‘PHP’ Category

How to Add Real-Time Notifications to Laravel with Pusher

Posted on: No Comments
The modern web user expects to be informed of everything that happens within the application. You don’t want to be that one website that doesn’t even have the notifications dropdown found not just in all social media websites, but everywher...

Why Is a String Called a String?

Posted on: No Comments
Why is a string called a string? Have you ever given this some thought? We never use such a word in contexts other than programming for a set of letters sticking together, and yet - in programming it's as pervasive as the word "variable". Why is that, ...

How to Write JavaScript-Style Test Watchers in PHP

Posted on: No Comments
I didn't start out writing tests for my code. Like many before and since, my "testing" was to write code and refresh the page. "Does it look right?", I'd ask myself. If I thought so, I'd move on. In fact, most of the jobs I've had have been with compan...

Re-Introducing Eloquent’s Polymorphic Relationships

Posted on: No Comments
You've probably used different types of relationships between models or database tables, like those commonly seen in Laravel: one-to-one, one-to-many, many-to-many, and has-many-through. But there's another type of relationship that's not so common: po...

The Theory of Constraints in PHP

Posted on: No Comments
I had been reading The Phoenix Project, a great novel about IT (you read that right), which presents day to day IT and devops problems at a large Amazon-like company in a way which makes mortals understand the complexities and chaos of 21st century tec...

How to Analyze Tweet Sentiments with PHP Machine Learning

Posted on: No Comments
As of late, it seems everyone and their proverbial grandma is talking about Machine Learning. Your social media feeds are inundated with posts about ML, Python, TensorFlow, Spark, Scala, Go and so on; and if you are anything like me, you might be wonde...

How to Defend Your Website with Zip Bombs

Posted on: No Comments
If you have ever hosted a website or even administrated a server, you'll be very well aware of bad people trying bad things with your stuff. When I first hosted my own little linux box with SSH access at age 13, I read through the logs daily and report...

How to Build a Lyrics Website with Laravel Scout and Algolia

Posted on: No Comments
Laravel Scout is a driver-based library for adding full-text search to Eloquent models. If you're not familiar with Laravel or Eloquent models in general, we have a good premium course available here. In this tutorial, we will create a minimal lyrics w...

8 Must Have PHP Quality Assurance Tools

Posted on: No Comments
For shipping quality code, we must have testing in mind while coding (if not doing TDD). However, with the wide range of PHP testing tools out there, it's hard to make a choice! Exploring PHP is a fun adventure (premium course on that here!) but it's h...

Poka Yoke – Saving Projects with Hyper-Defensive Programming

Posted on: No Comments
When working in a medium to large team on the same codebase, it can sometimes become hard to understand each other's code and how to use it. Various solutions exist to help with this. For example, you can agree to follow a set of coding standards to ma...