Ramblings from my life - especially web development with Laravel, WordPress and PHP.

Navigation

Laravel 5.2 Authentication Custom User Providers

Introduction If you haven't heard of Laravel before, check it out - it's a modern PHP framework that makes it a breeze to develop web applications. As part of Laravel, it includes an Authentication service which lets users login to your application. The Laravel Auth service is incredibly powerful, allowing you to configure different "guards" to protect different areas of your site - e.g. a user area & admin area. It's also very flexible as…

WordPress With Load Balancer SSL Termination

If attempt to run WordPress in a load balanced environment with SSL terminated on the load balancer(s), you may find requests to your site get stuck in a redirect loop. This is due to WordPress not trusting forwarded SSL by default. To solve this issue, you simply need to add the following snippet to your wp-config.php file: if ($_SERVER['HTTP_X_FORWARDED_PROTO'] == 'https') { $_SERVER['HTTPS']='on'; } To be slightly more secure, you might…

Forwarded SSL with the PHP Happyr LinkedIn API client

Sometimes when working with a library you hit a problem that isn't covered in the documentation and you need to roll up your sleeves and get stuck in to find solve the issue. I had to do this recently when working a project. This project needed to make use of the LinkedIn API - so an API library was needed. Happyr/LinkedIn-API-client appeared to do everything that was needed, and looked easy to use. After a…

Discovering Myanmar - My 2 Week Solo Travel Adventure

Having never travelled solo and never visited a country that has a totally different culture to that here in the UK, I decided to throw myself in the at deep end and booked myself two weeks in Myanmar (or Burma as it used to be known) in November 2015. I spent my time there visiting the main tourist hotspots - Yangon, Bagan, Mandalay and Inle Lake. Two weeks just wasn't enough time though - there was…

New camera at Bournemouth Wheels Festival 2015

Following the success of the Air Festival which is held towards the end of the summer, Bournemouth also has the Wheels Festival - which was back for it's second year at the start of the summer. Having just purchased a new camera (Panasonic DMC-FZ1000) in preparation for my trip to Myanmar (Burma), it was a good opportunity to test it out. I'm a total beginner when it comes to photography, but here are some shots from…

Climbing Mount Snowdon

"Let's go climb Snowdon" - the four words that sounded brilliant whilst chatting in the pub with some friends. What a great idea - take time out from our normal lives and spend some time walking & climbing mountains. And as it turns out, it really was a great idea. That great conversation left me with just under 2 weeks until we were going; I had some gear from previous camping trips, but ended up taking…

Working with WordPress & GIT

Every developer has their own way of dealing with the beast that is WordPress whilst trying to follow good development practices. It's always best to avoid 'Cowboy Coding'; aka hacking code on the live server. With the ability to edit theme & plugin files through the admin area, WordPress makes this bad practice far too easy. Then you have auto-updates and content editors installing 3rd party themes and plugins. This quickly leads to development versions becoming…