DC Blog | David Carr - Web Developer Blog RSS Feed https://dcblog.dev Latitude and Longitude with Google Maps Google Maps allows using its service to get map coordinates....

Thu, 12 Mar 2020 18:33:42 GMT https://dcblog.dev/latitude-and-longitude-with-google-maps https://dcblog.dev/latitude-and-longitude-with-google-maps
Laravel Merge PDFs

Ever needed to merge multiple PDF's together? It's a common need. In this tutorial, I'll cover how to do merge multiple pdf's together in Laravel.

Mon, 02 Mar 2020 07:14:02 GMT https://dcblog.dev/laravel-merge-pdfs https://dcblog.dev/laravel-merge-pdfs
Laravel API change unauthenticated message

When making API calls to Laravel when a user who is not authenticated makes a call a 401 status code is returned the response message: Unauthenticated.

Sat, 29 Feb 2020 21:24:27 GMT https://dcblog.dev/laravel-api-change-unauthenticated-message https://dcblog.dev/laravel-api-change-unauthenticated-message
Laravel returns 302 for unauthenticated calls

I've started to secure API calls with Laravel Airlock, when calling a route that's been secured with the middleware auth:airlock unauthenticated calls we're returning a status code of 302 means the route has been found. When 401 unauthenticated should have been returned.

Sat, 29 Feb 2020 21:15:09 GMT https://dcblog.dev/laravel-returns-302-for-unauthenticated-calls https://dcblog.dev/laravel-returns-302-for-unauthenticated-calls
Upgrade Laravel Valet to PHP 7.4

First you should upgrade your machine to PHP 7.4...

Tue, 11 Feb 2020 07:23:33 GMT https://dcblog.dev/upgrade-laravel-valet-to-php-74 https://dcblog.dev/upgrade-laravel-valet-to-php-74
How to integrate PayPal into PHP

In this post, I’ll explain how to use PayPal for one-off payment and how to use the Instant Payment Notification (IPN) to process payments on your website.

Wed, 15 Jan 2020 08:01:27 GMT https://dcblog.dev/how-to-integrate-paypal-into-php https://dcblog.dev/how-to-integrate-paypal-into-php
Send emails with Office 365 SMTP

Office 365 is great for handling emails but it can also be used as an SMTP relay for your website. I've tried dedicated SMTP services with mixed results some work better than others. What I like about using Office 365 is it's easy to set up and very reliable. The added benefit of Office 365 is your sent emails saved in your sent folder! very handy.

Mon, 13 Jan 2020 07:22:05 GMT https://dcblog.dev/send-emails-with-office-365-smtp https://dcblog.dev/send-emails-with-office-365-smtp
V1 PDO Wrapper released

I've updated and pushed a new release to my PDO Wrapper package.

Fri, 10 Jan 2020 00:13:04 GMT https://dcblog.dev/v1-pdo-wrapper-released https://dcblog.dev/v1-pdo-wrapper-released
Test composer packages locally

When developing a new composer package you will want to test it locally before uploading it to Packagist.

Thu, 09 Jan 2020 23:33:14 GMT https://dcblog.dev/test-composer-packages-locally https://dcblog.dev/test-composer-packages-locally
Convert translate message calls to a single json language file

Laravel supports using the __() call to setup locale for your pages ie in a blade file you may have a title called Dashboard. To make it translatable you would use

Thu, 09 Jan 2020 07:37:07 GMT https://dcblog.dev/convert-translate-message-calls-to-a-single-json-language-file https://dcblog.dev/convert-translate-message-calls-to-a-single-json-language-file
MySQL 8.0+ error: The server requested authentication method unknown to the client

Upgraded MySQL to v8 and starting getting connection errors due to how MySQL 8 defaults to auth_socket connections. Applications that use passwords will fail and generate the error

Thu, 05 Dec 2019 09:16:13 GMT https://dcblog.dev/mysql-80-error-the-server-requested-authentication-method-unknown-to-the-client https://dcblog.dev/mysql-80-error-the-server-requested-authentication-method-unknown-to-the-client
Switching between PHP versions with Homebrew

With Homebrew it's possible to have multiple versions of PHP installed at once, to switch which version is active unlink the current version and link the desired version. 

Sun, 01 Dec 2019 14:40:58 GMT https://dcblog.dev/switching-between-php-versions-with-homebrew https://dcblog.dev/switching-between-php-versions-with-homebrew
Upgrade PHP 7.4 with Homebrew

PHP 7.4 came out this week, so it's time to upgrade! 

Sat, 30 Nov 2019 00:02:41 GMT https://dcblog.dev/upgrade-php-74-with-homebrew https://dcblog.dev/upgrade-php-74-with-homebrew
Laravel adding custom validation errors

Have a situation where you need to add custom errors to the error array after validation? this post will cover how to accomplish this.

Sat, 23 Nov 2019 14:11:51 GMT https://dcblog.dev/laravel-adding-custom-validation-errors https://dcblog.dev/laravel-adding-custom-validation-errors
The PHP Workshop

I'm really happy to announce my new book The PHP Workshop has been published! 

Mon, 04 Nov 2019 06:57:36 GMT https://dcblog.dev/the-php-workshop https://dcblog.dev/the-php-workshop
Setup Linode - Part 10 Laravel

The following steps are needed for running Laravel on Linode.

Sat, 26 Oct 2019 09:30:35 GMT https://dcblog.dev/setup-linode-part-10-laravel https://dcblog.dev/setup-linode-part-10-laravel
Setup Linode - Part 9 Remote MySQL over SSH

To connect to your Linode database remotely log in to your MySQL client over SSH

Sat, 26 Oct 2019 09:28:46 GMT https://dcblog.dev/setup-linode-part-9-remote-mysql-over-ssh https://dcblog.dev/setup-linode-part-9-remote-mysql-over-ssh
Setup Linode - Part 8 MySQL

Logged in as a user use sudo to access elevated privileges or login as root.

Sat, 26 Oct 2019 09:25:53 GMT https://dcblog.dev/setup-linode-part-8-mysql https://dcblog.dev/setup-linode-part-8-mysql
Setup Linode - Part 7 Lets Encrypt

Setting up an SSL certificate enables HTTPS on the web server, which secures the traffic between the server and the clients connecting to it. Certbot is a free and automated way to set up SSL certificates on a server.

Sat, 26 Oct 2019 09:00:36 GMT https://dcblog.dev/setup-linode-part-7-lets-encrypt https://dcblog.dev/setup-linode-part-7-lets-encrypt
Setup Linode - Part 6 Virtual Hosts

Virtual hosts maps folders to domain names allowing multiple sites to be configured on a single server.

Sat, 26 Oct 2019 08:34:06 GMT https://dcblog.dev/setup-linode-part-6-virtual-hosts https://dcblog.dev/setup-linode-part-6-virtual-hosts