Menu
  • Home
  • Recent Posts
  • My Skills
  • My Projects
    • All Projects
  • My Blog
    • PHP MySQL Development
    • Laravel Development
    • Javascript Development
    • WordPress Development
    • Magento Development
    • System Administration
  • Contact

Category: PHP MySQL Development

Adding Email Headers in Laravel Application

October 2, 2020
| No Comments
| Laravel, PHP MySQL Development
Email with custom header

Adding email headers in Laravel application is quite simple. SwiftMessage can be customized using withSwiftMessage method of Mailable base class: https://laravel.com/docs/8.x/mail#customizing-the-swiftmailer-message However you have to remember to do it every time you create a new “mailable” class. Some mail APIs require you to put a special header each time you send an email. In this…

Read More »

Posted in Laravel, PHP MySQL Development

API Server Logging with Laravel

September 11, 2020
| No Comments
| Laravel, PHP MySQL Development

When you work with APIs it is usually a good idea to log requests and responses. I already covered how to do logging when you are consuming an API. You can read about it in this post. Here we will cover how to do it when building an API service with Laravel. For example, you…

Read More »

Posted in Laravel, PHP MySQL Development

Exporting Records with Timezone Adjustments

August 27, 2020
| No Comments
| Laravel, PHP MySQL Development

As a rule, dates in a database are stored in UTC. So, when you export records from database constrained by dates, it is a good idea to use appropriate timezone in export query. You can do it in one of two ways. One way is create incoming dates in user’s timezone, then covert time to…

Read More »

Posted in Laravel, PHP MySQL Development

Retrying and Logging Requests with Guzzle

May 10, 2020
| No Comments
| PHP MySQL Development
Logging and Retrying API Calls

When consuming 3d party API, you may want to do two things: Retrying.  Usually you can retry your requests on 500 responses received from server. Logging. It is considered a good practice to log requests you send and responses you get back. In this article we will look at how to implement the above features…

Read More »

Posted in PHP MySQL Development

Stream Files From S3

September 20, 2019
| No Comments
| Laravel, PHP MySQL Development

When using S3 as our external storage, sometimes we have to let users download files from S3. If file is too large, it may not fit in the memory. The solution is to stream file into user’s browser straight from S3. Let’s take a look how to do it with Laravel’s Filesystem. There are 2…

Read More »

Posted in Laravel, PHP MySQL Development

Testing API Clients

June 9, 2019
| No Comments
| Laravel, PHP MySQL Development

Since an API client is a boundary between your code and the outside world you should write as little code as possible to implement it. The client should strictly do its job by sending a request and returning a response. That is why we don’t really test the clients themselves but rather the code that processes the response from the client.

Read More »

Posted in Laravel, PHP MySQL Development

Setting up a PHP Application

May 6, 2019
| No Comments
| PHP MySQL Development

When setting up a new PHP application one should consider how to manage certain housekeeping tasks such as exception handling, logging, and mail notifications.

Read More »

Posted in PHP MySQL Development

Laravel WebSockets as a Service

December 31, 2018
| No Comments
| Laravel, PHP MySQL Development

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…

Read More »

Posted in Laravel, PHP MySQL Development

DB Resource Usage

December 19, 2018
| No Comments
| PHP MySQL Development

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;

Read More »

Posted in PHP MySQL Development

Testing with Service Container

November 18, 2018
| No Comments
| Laravel, PHP MySQL Development

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…

Read More »

Posted in Laravel, PHP MySQL Development
  • 1 of 3
  • 1
  • 2
  • 3
  • Next »

Archives

  • July 2022
  • July 2021
  • April 2021
  • February 2021
  • October 2020
  • September 2020
  • August 2020
  • May 2020
  • September 2019
  • August 2019
  • June 2019
  • May 2019
  • December 2018
  • November 2018
  • September 2018
  • August 2018
  • May 2018
  • April 2018
  • March 2018
  • February 2018
  • November 2017
  • October 2017
  • September 2017
  • July 2017
  • June 2017
  • December 2016
  • October 2016
  • September 2016
  • August 2016
  • July 2016
  • June 2016
  • May 2016

Meta

  • Log in
Back to Main Page

© 2020 Alex Rusin. All Rights Reserved.