Laravel 6.x New Project Configuration

Recently, I’ve finally started digging into Laravel 6.x. The simplicity and straightforward nature of the framework has been a welcome relief, although as such with any new framework, information can be piecemeal and scattered. After setting up a few sample projects, this is what I’ve come up with to scaffold and setup a simple Laravel application. Note that I use PHPStorm and Apache (via XAMPP).

# install composer and initialize the project
composer global require laravel/installer
laravel new myproject

# install PHPStorm IDE helpers
composer require barryvdh/laravel-ide-helper --dev
# install laravelcollective HTML helpers
composer require laravelcollective/html

# configure your webserver and hosts file as needed (e.g. add a vhost entry and a fake domain name that points to it)

# require UI components
composer require laravel/ui --dev
# install bootstrap
php artisan ui bootstrap
php artisan ui bootstrap --auth # if using authentication

# generate the IDE helper classes for PHPStorm
php artisan ide-helper:generate

# install npm packages
npm install

# compile css and js assets (one-time)
npm run dev

Quick conversion from UTC to local time in PHP

I ran across something in a work project where I was required to convert all times stored in UTC to the client’s local time zone. All of the PHP solutions involved multiple lines of code involved the DateTime and DateTimeZone classes, so in order to simplify that, I came up with the following: $formatUTCDateTime = […]


Convert a constant value to its string name in PHP

I ran into a case where I had to get the string representation of a constant based only on its value, so a little digging around and some experimentation produced this: const MY_CONSTANT = 1; // get constant name by value $class = new ReflectionClass(‘MyClassName’); $constants = array_flip($class->getConstants()); echo $constants[1]; // output is “MY_CONSTANT” If […]


A Diamond in the Rough? In a sense…

I ran across this gem tonight while trying to figure out why Visual Studio 2010 has crashed on me ten times in under an hour.  The discussion is primarily focused on the compatibility of the AnhkSVN SCC pluin, albeit with a few side tangents. It was the last comment, however, which made the hours of […]


Senet 1.0

I’ve been experimenting with the CraftyJS JavaScript game framework lately, and I’m happy to announce my first complete game: Senet. Senet is an ancient Egyptian game whose rules are the subject of some debate. A homebrew version for the Wii exists, but it’s somewhat incomplete and riddled with bugs. This version was born out of […]


4th of July Lassoing Demonstration FAIL

I captured a rather embarrassing performance earlier today during our town’s Independence Day parade. You can find the original YouTube posting here.


public string helloWorld();

Greetings. I’ve finally committed to something I’ve wanted to do for a long time; write about what I love to do. And what I love to do is develop software. To me, “coding”, “programming”, and “developing” are three entirely different approaches to what are fundamentally all the same task. The difference lies in the attitude […]