#php

Pause Laravel queue execution

I’ve been building a new side project that queries the GitHub API a lot; enough that I’m likely to hit my rate limit semi-regularly.

Check if row was created with Laravel `updateOrCreate`

In a recent project I needed to know if updateOrCreate created a new row or if it updated an existing row so that I could trigger some processing that only needed to be done when a new row is created.

PSR-15 middleware, Zend Expressive and versioning

As it turns out, I mis-remembered what Matthew said in his talk and yesterday's post with Slim isn't actually PSR-15 compatible. Slim currently uses function($request, $response, $next) whilst …

Middleware, Slim and versioning

This morning at #GrumpyConf I watched Matthew Weier O'Phinney give a talk on PSR-15 and middleware and it got me thinking about how useful it can be for transforming API requests and responses …

Speech-to-Text with IBM Watson and PHP

I needed a speech to text engine for a project that I'm working on at Nexmo, and we settled on the IBM Watson speech-to-text engine.

2FA logins with Laravel and Nexmo

I recently wrote about bootstrapping Laravel with user authentication and how easy it is (seriously, it takes less than 5 minutes). That provides us with a great starting point for our applications, …

Bootstrap a new Laravel project with user authentication (in 5 minutes)

We're starting from scratch here, so the first thing we need to do is to create a basic Laravel installation for our project. To to this, run the following command:

The class 'APCIterator' could not be found

This one catches me out every time, so documenting here for posterity.

PHP: return and the HEREDOC syntax

PHP just threw up this error, which had me stumped for a while: