Identify All the Things With UUIDs! #PHP

Universally unique identifiers (UUIDs) are a fun and exciting way to identify things. We can issue UUIDs forever and never run out; they’re practically unique! Join this whirlwind adventure in search of the perfect identifier to find out why UUIDs might be good for your projects.


Understanding #Laravel Middleware

HTTP Middlewares provide a convenient mechanism for filtering HTTP requests entering your application. Laravel, for example, has a middleware for verifying a user’s authentication.

Some Middleware Use-Cases

  • Using a middleware to confirm the incoming route request API key. Assuming you are building an API.
  • Rate-limiting a service call.
  • Change the site language based on locale.
  • Enable site-wide maintenance.
  • Sniffing bot traffic.
  • Logging.


Cross-Site Request Forgery (CSRF) #podcasts

Cross-Site Request Forgery (CSRF) are a type of security attacks that may cause user accounts to be abused, so attackers can make users perform actions inadvertently in a vulnerable site and cause serious problems to the users and the sites.

There is a new proposal for PHP 7.1 to provide built-in semi-automatic protection against CSRF attacks, so it will be easier for PHP developers to protect the sites they develop against this type of exploit.


JavaScript Rounding

Very often calculations in javascript produce results that don’t quite fall within the ranges we want, or generate numbers that need to be “cleaned up” before use. Exactly what happens to those numbers – rounding up or down, set within a range, or being “clipped” to a certain number of decimal places – depends on what you want to use them for.