Bootstrap 4 Pagination With Laravel
As of version 5.2.14 Laravel has supported pagination with Bootstrap 4 (Currently Alpha 2). Here's how to use it, or indeed any custom pagination class you may have set up. Firstly create a new service provider php artisan make:provider PaginationServiceProvider In the register method we’ll pass a closure to Laravel’s paginator class that creates and returns
How Composer Version Constraints Work
When using composer you’ve probably seen the 3 main operators used within the version contraints, wildcard *, tilde ~ and caret ^, each have their own uses and some which should be avoided if possible. Wildcard This is possibly the most commonly used constraint because it’s universally known. It is however a common cause of composer
Enabling Swap on Ubuntu
Digital Ocean’s 512MB RAM instances are great for running a small website from, if you tighten up your configs you can actually get some pretty great performance from them, but sometimes that low amount of RAM can be an issue, particularly when you have a large amount of dependencies with npm and other such package managers.
Laravel Eloquent Casts
Laravel’s Eloquent is a very powerful ORM however quite often in Laravel 4 I found myself creating accessors which simply cast the value to a specific type, rather than, in most cases just being a string out of the database.
Enabling gzip compression on nginx
I’ve recently relaunched my site and as part of doing so spent quite a lot of time optimising the server and pages to make sure things load as quickly as possible, as Google has for some time been taking the page load speed into account when ranking results. Fortunately, the clever people at HTML5 Boilerplate have done much of the work for us
Free HTTPS/SSL certificates with Let's Encrypt
Back in October 2015 Let’s Encrypt received cross-signatures from IdenTrust, which means their certificates are now trusted by all major browsers. They entered a closed beta period, and in December they extended their beta to the public, which means SSL certificates are completely free and automated, for everyone. Let’s get started creating and installing a certificate.
2016 Resolutions and the year ahead
2015 has been another great year, having purchased my first new car, holiday to Zakynthos, several day trips to London, and I also became an uncle. 2016 is looking to be another bumper year already having plans for two holidays, one somewhere in Europe during the summer for sightseeing and traveling, and another package holiday later in the year just to relax
Updating PATH environment variable (OSX and Unix systems)
The PATH environment variable is used to store locations where executable files are found so that when we run a command its actually mapped to the executable on your filesystem. (i.e: running vi will alias to /usr/bin/vi) You can find out the true path of an executable by using which (i.e: which vi will output
2014, 2015 and beyond
2014 was a brilliant year, and it started off on good footing. January I decided to make my life healthier. Throughout the year I set about making healthier decisions about food, this stuck until about August, but I’m still under my original weight. February I met the most amazing person, who nearly a year later puts up with my nerdy-ness
Installing HHVM on OSX
Just a quick post on how to install HHVM on OSX Mavericks (Also works on Mountain Lion). I use HHVM locally to speed up composer. A great way to do that is to create a bash alias for composer.