Web Developer | Laravel | ReactJS

My Blog is about Web Development and my journey as a CrossFitter.

Michael Brooks Profile Image

How to containerize your PHP/NGINX docker project properly

Posted in Programming Tutorials on Apr 11, 2016

<p>This evening, I had myself a little challenge. I would turn my two containers (MariaDB and my own built container) into more containers, but using the power of Docker's official container repos. E.g. I would have 3 containers in total PHP7-FPM, NGINX and my already created MariaDB.</p> <p>If you don't know my steps I previously created, you can check it out <a href="https://michaelbrooks.co.uk/post/hosting-your-site-digital-ocean-and-docker">here</a> and skip to MariaDB for your database container and settings.</p> <p>First off, I used the PHP container and followed instructions to have a PHP7-FPM container. You can see below for the Docker file, just copy it and run the command below...</p> <script src="https://gist.github.com/Michael-Brooks/14796d59271812a1070361532004ceab.js?file=PHP7%20Dockerfile"></script> <pre><code>docker...</code></pre>

Michael Brooks Profile Image

Windows 10 UWP Web Wrapper App Release

Posted in General Updates on Apr 09, 2016

At the beginning of this week, I had decided to give myself a little project of creating an app for the Windows 10 ecosystem. I wanted to my website to be a Windows 10 app and I wanted to create this with as little effort as possible.

Michael Brooks Profile Image

Hosting your site With Digital Ocean and Docker

Posted in Programming Tutorials on Mar 27, 2016

I want to share with you how I am hosting my website with [Digital Ocean](https://m.do.co/c/d5aca73b366f) (hosting company) and [Docker](http://docker.com) (places your app in containers). First off, I created my droplet on DO and used the docker image from the list of "One-click Apps". The droplet was the $10 a month size as I don't currently need anything more. (If you want to try Docker for a month or two then [click here](https://m.do.co/c/d5aca73b366f)).

Michael Brooks Profile Image

New Year, New Blog, New something?

Posted in General Updates on Feb 27, 2016

I am really stoked to show you guys my brand new Blog built with http://octobercms.com. For my hosting, I have used https://m.do.co/c/d5aca73b366f (click the link for $10 free). Digital Ocean is a fantastic hosting company which I just love to use as they give you complete control over your VPS, and they even give you One-click apps to help you get started.

Michael Brooks Profile Image

Using View Composers in Laravel 5.2

Posted in Laravel, Programming Tutorials on Feb 03, 2016

I have started using Laravel's View Composers which come in handy when you have a navigation bar that constantly needs certain data. For example, you have an ecommerce store and you need to poll how many items a user has in their basket on pretty much every page they move onto, or you need a login/register button when a user isn't logged in and then a profile options button when they are. You could be really lazy and add the same code/query into every single controller, which yes, that will work, but then that's not DRY (Don't Repeat Yourself). To fix this, we can complete a couple of simple steps and have one bit of code which will constantly be in use every time a certian partial is called.

Michael Brooks Profile Image

Dealing with Performance Anxiety and Depression as a Web Developer

Posted in General Updates on Jan 26, 2016

It has been a year since I had been let go from from previous employment and whilst the circumstances were understandable, it really did hit me. It was something which was unexpected and I really thought I was going somewhere with the comapany and expected to be there for at least 3 years. When they told me the circumstances, I tried to fight my corner in order to carry on working for them, but because they were struggling themselves, there was nothing that they nor I could do.

Michael Brooks Profile Image

Using Vagrant and Homestead In as Little Steps as Possible (Per Project Install)

Posted in Programming Tutorials on Jan 20, 2016

I want to show you guys just how quick and easy it easy to get a Laravel project up and running alongside Vagrant/Homestead.

Michael Brooks Profile Image

Mounting Volumes in Docker and Using Windows 10

Posted in Programming Tutorials on Nov 20, 2015

This is a quick post to details some issues I have found when trying to use Docker within a Mac or Windows environment. I had been following this tutorial on how to get [Laravel up and running on Docker](http://www.sitepoint.com/docker-and-dockerfiles-made-easy/) and my first pain I came across has been shared with both Mac and Windows environments. Basically, when you go to mount a volume, by default you can only mount local directories in your User folder. To fix this, you first need to open up your VirtualBox GUI. Click on your current VM and click on "Settings", then head over to "Shared Folders". When you get here, you will want to click on the plus symbol to add a new folder share. For me, I wanted to mount my sites directory which could be found in my d drive...

Michael Brooks Profile Image

May Update

Posted in General Updates on May 11, 2015

I just want to write to my Blog followers and notify you all that I have been relatively busy lately and that is the reason for lack of any posts. I have just been employed by a company called [CreateANet](http://createanet.co.uk). They specialise in app development, so it's an exciting time for me and my future. I have been settling in got the past couple of weeks and all seems to be going well thus far.

Michael Brooks Profile Image

Oauth Tutorial - Part 1 - Setting up Facebook

Posted in Programming Tutorials on Apr 05, 2015

Last week I promised that I will be creating some tutorials regarding Oauth and Laravel's Socialite plugin. Today, we will start with setting up each website and creating on app on these sites to accept our Oauth requests. Firstly, we will start with Facebook, then head on over to Twitter and Google+. I am using these as my website won't be for developers, it will be for everday people so I don't expect them to have a Github or Linkedin account. If however, I want to implement these at a later date, I will post the setup of them here for you to see.

Brooks Pet Sitters - Newton Abbot Pet Sitters