Deric Cain

Tech ramblings of a true #geek.


Listings for: Php

Why I Decided To Embrace Laravel

Posted on May 2nd, 2016

Over the last year, I took part in three large projects. My task was to move away from the old architecture based on PHP and server-side HTML generation, and transition to REST API.

With the old approach, back-end developers were expected to know much more about the UI and visual aspects of the application. Because of this, they had to pay…

Multiple file uploads with Vue.js and Laravel

Posted on April 12th, 2016

I am working on an app and decided to take the plunge and use Vue. I have heard a lot of neat things about it and thought now is as good a time as any to learn a Javascript framework. I ran into a situation where I wanted to be able to upload multiple files and I couldn’t find…

Arrays are everywhere! - Part 1

Posted on March 18th, 2016

One of the most used data types in development is arrays. They are used so much, in fact, that PHP has a ton of different built-in array functions. I am going to do a series of the different array functions that PHP offers. Let’s look at a couple and how they can be useful.

array_unique()

If you have an array that…

Using the Repository Pattern in Laravel 5

Posted on March 10th, 2016

The Repository Pattern is a very useful pattern with a couple of great uses. The first use is the abstraction that it provides. Meaning, it adds another layer between your application logic and your database. When tackling separation of concerns, this is very important. Another benefit is how easy it makes it to swap out your backend technology. For instance,…

Easy month array with PHP

Posted on March 4th, 2016

I don’t know about you, but I use a month dropdown in a lot of projects. I got tired of typing them out, one by one, so I decided to look for an array. I just knew that someone had a gist out there with an associative array where the key was the number of the month and the value…

Deploying Laravel 5 Apps with Rocketeer

Posted on January 2nd, 2016

I wanted a way to deploy my Laravel 5 projects with Rocketeer because it has worked so well for me in the past. I love the fact that it clones a git repo on the staging or production server, so chances are, your code has been tested and verified. Also, if there is an issue, it is very…

Multi-environment PHP Deployment with Rocketeer

Posted on November 24th, 2015

I started a web project using Codeigniter and I was looking for a good tool to use for PHP deployment. I was used to working with Wordpress and had the luxury of using wordmove which was a Wordpress deployment tool for Vagrant. Wordmove spoiled me with how easy it was to move a whole Wordpress site, database and all,…