Category Archives: Misc

Tile Emporium Ringwood – Website Launched

We are pleased to announce our launch of another new website: Tile Emporium Ringwood.

Suppliers of all types of tiles for home and garden, trade and retail, our client supply kitchen, floor & wall tiles  and have an extensive showroom in Ringwood which is easily accessible from Bournemouth, Poole and Southampton.

The website is a mobile first sales focused brochure type website which encourages the visitors to order free tile samples, join the social network, make an enquiry or to visit the showroom.

The telephone number is clickable on a mobile making it easy for customers to call.

The website is also secure which helps SEO and utilises the modern .uk extension instead of the old fashioned .co.uk version.

And – we achieved relevant 1st page organic Google results the day after launch!

Visit Tile Emporium Ringwood: Tiles Bournemouth

Creating New Sites with Homestead & Laravel on Mac OSX

If you’ve previously installed Homestead on your local OSX machine and have a few sites running on the same Vagrant box, this guide is a reminder on how to add additional sites.

In a text editor or Bash Nano, edit the

~/.homestead/Homestead.yaml file.

Append the new sites under ‘folders’ and ‘sites’.

In Terminal, navigate to your Homestead sites directory, eg:

$cd /Users/Harrold/Sites/Homestead/sites

Create the new Laravel project, eg:

$ laravel new project-name

The project-name is the folder name from your .yaml folder map

Reload Vagrant for the changes to take effect

$ vagrant reload

SSH into Vagrant:

$ vagrant ssh

Navigate to the Laravel project, eg:

$ cd /home/vagrant/project-name

Run Composer Install to download Laravel’s dependencies.

$ composer install

Setup the .env file

$ mv .env.example .env

Generate the Laravel application key:

$ php artisan key:generate

If necessary, set the permissions:

$ sudo chgrp -R www-data storage bootstrap/cache
$ sudo chmod -R ug+rwx storage bootstrap/cache

You may need to manually set up the Nginx Server Blocks, remembering to setup the symlinks:

$cp /etc/nginx/sites-available/old-site /etc/nginx/sites-available/another-site

$ sudo nano /etc/nginx/sites-available/old-site

$ ln -s /etc/nginx/sites-available/another-site /etc/nginx/sites-enabled/another-site

$ sudo nginx -t

$ sudo service nginx reload

Navigate to the site in the browser to hopefully see a Laravel home page!

Edit the welcome page to check the Server Blocks are pointing to the correct site.

Bookmark the dev URL in the browser, and the Database connection in the DB GUI.

Setup the databases and other Laravel stuff and configure the app/config etc.

 

Software Samaritan

If you have a software coding problem, often describing the problem to a colleague reveals the solution.

Your colleague takes the role of ‘Software Samaritan’. They sit there and listen but don’t utter a single word.

By describing the problem in greater detail to enable your colleague to fully understand it, I find the problem solves itself.

Laravel Caching – Not seeing changes in views

We noticed a problem where minor updates to Views in Laravel 5 were not being reflected when refreshing the browser.  The only way to see the changes was to force an error in the Controller and then the View would be refreshed. Not only was this annoying, but if we forgot about this work around then much frustration is encountered.

The solution is to alter the OPCache settings in the PHP.ini:

opcache.memory_consumption=128
opcache.interned_strings_buffer=8
opcache.max_accelerated_files=4000
opcache.revalidate_freq=60
opcache.fast_shutdown=1
opcache.enable_cli=1

Remember to restart PHP FPM.