Setting up a PHP Application
When setting up a new PHP application one should consider how to manage certain housekeeping tasks such as exception handling, logging, and mail notifications.
When setting up a new PHP application one should consider how to manage certain housekeeping tasks such as exception handling, logging, and mail notifications.
Recently Beyondcode came out with a web sockets package for Laravel. For my mailroom project I decided to add push notifications when a service receives a webhook. This a great use case for Laravel WebSockets package. In this article we will take a look at how to install it as a service using Docker and use…
You can use the following query to see who is using your database resources SELECT max(user) as user, count(*) as connections_count, db from information_schema.processlist GROUP BY db order by connections_count desc;
The backbone of Laravel is service container. Service container is used for resolving classes and dependency injection. Container comes as a standalone package, so you don’t have to have Laravel installed to use it. Service container can be very handy when testing. Let’s look at how we can use it . Our basic set up…
Out of the box Laravel supports many mail drivers, such as smtp, sendmail, mailgun, log, array, etc. But what if you wold like to use a mail service that Laravel does not have a driver for, such as Mailjet? You can create a custom driver for that service. This article will describe how to create…
Mailrom Tools (Mailroom server and Mailroom Clerk client) help you develop locally against web hooks, HTTP callbacks from a remote server. To learn how to use the tools read post Debugging Webhooks It is an open source project. You can read documentation and look at the source code on GitHub.
When you extensively work with certain APIs, like Shopify’s for example, you will end up with bunch of functions that map to API’s endpoints. One of the approaches I have seen so far is to create an API class ShopifyApi and make those functions class methods. So it looks something like the figure below. I…
A great article on how to set up and manage ssh keys for multiple github accounts/repositories SSH Keys with Multiple GitHub Accounts
Let’s assume we have a use case. We create products at someotherwebsite.com. In the end of each day we want to sync newly created products to Shopify store using API. Each product that we are creating has a unique code to identify it. This code corresponds to Shopify product’s sku. This is how we link…
A webhook is an HTTP callback, that occurs when something happens (a resource changes its state). Webhooks provide a way to build event-driven apps, because you can be notified about changes. Since webhooks require a publicly accessible URL to function they can be hard to test from your local machine. There are three main problems…