Paul R. Redmond's Blog, page 2
September 17, 2017
My Simple Approach to using Docker and PHP
Getting started with Docker and PHP can still be a steep learning curve. You might feel that you don���t need something like Docker and that Vagrant or full local development work just fine. I still use local development on some projects because the barrier to entry is small.
You will likely face scenarios where you require different versions of PHP, work with multiple developers, and seek consistency between environments. When you���re working with a team, you need a consistent way to develo...
April 6, 2017
Using Guzzle 6 Middleware in a Laravel Application
The most significant change between Guzzle 5 and 6 is moving away from the event system I grew so accustomed to in Version 5 to middleware in version 6. Needless to say, it was a big adjustment for me at first and it felt like a downgrade. After my initial grumbling, the upgrade guide explains the reasoning for the change:
Instead of using the event system to listen for things like the before event, you now create a stack based middleware function that intercepts a request on the way in and...
February 14, 2017
Automatically Publish New Atom Package Versions
I wrote this quick bash script that automatically increments the version of my Atom text editor plugins, pushes everything to my git remote, and then finally publishes the new version to Atom via apm:
Drop this file in the root of your Atom package (see my example) and make sure the file is executable with chmod u+x ./publish. In my example, I also generate the latest snippet documentation before incrementing a new version, pushing tags, and finally publishing the new version with APM.
You c...
February 13, 2017
How to Create Automated Documentation for Atom Text Editor��Snippets
While building an Laravel snippet plugin for the Atom text editor, I thought it would be helpful to produce human-friendly documentation for all the snippets contained in my plugin. This post is a quick tutorial demonstrating how to parse CSON files and produce documentation for your Atom plugin.
Atom���s snippets use CSON (CoffeeScript-Object-Notation), which is a readable enough format, but I wanted to combine all snippets into a generated, human-readable markdown document.
You can see the...
Larasnippets: My Collection of Laravel and PHP Snippets for the Atom Editor
I���ve been using the Atom text editor lately, which is getting really solid. I decided to port some of my Laravel and PHP snippets into an Atom package to get a feel for how to create packages and snippets in Atom. I am pleased with how easy it was to get started. I just typed Command + Shift + P and selected Package Generator: Generate Package. Specifically, check out Hacking Atom in the Atom flight manual to get started.
Check out my package on Atom.io Packages, the source code on Github o...
November 19, 2016
Docker for PHP Developers Book Announcement
I am excited to announce our next book title at Bitpress, Docker for PHP Developers! Docker has grown on me over the last two years, but I realize that not all PHP developers have experimented with it yet. Google produces lots of tutorials and projects using Docker with PHP, but you will be hard-pressed to find a complete guide that takes you from beginner to using Docker full time every day.
I want to change that.
The goal of this book is to provide you with answers to most every common c...
February 16, 2016
How to Accept JSON POST Requests in Lumen
Sending a JSON encoded entity to a RESTful API is a common need, and a JSON payload is actually pretty slick and convenient. It eases the pain of form-encoded strings when sending post data, and makes it easier to structure complex data thats more readable. It can also make documentation easier to follow when you share cURL examples of making requests to your API. JSON is much easier for readers to digest compared to form encoded request params.
So how do we do it in Lumen? I will show you a...



