Basic ProcessWire website workflow - Part Four


Following Part 1, Part 2 and Part 3.

In this post we will make the final touches and personalizations to our website. Let’s see what are going to do:

  • Implement a basic Sitemap
  • Implement ProcessWire Roles and Permissions
  • Tweak CKEditor a little bit
  • Implement a little countermeasure to avoid bots to read emails
  • Implement the Facebook plugin
  • Add the cookie notification

Also this post concludes this series on ProcessWire, but don’t worry, I’m planning …

Read More
Easily impersonate any user in a Laravel Application


Impersonate is quite a handy feature in some applications. It allows you to choose from a list of users and to impersonate them, in order to see the application from their point of view, without having to log out and log in again. For example, as an administrator you want to recreate a bug encountered by one of your users, without having them to share their password with you.

It’s a functionality that it’s really powerful, but at the same time it’s …

Read More
Basic ProcessWire website workflow - Part Three


Following Part 1 and Part 2.

In this Post we will look on how to implement the PW modules introduced in Part 1. Let’s recap them:

  • MarkupSimpleNavigation: to generate the main navigation menu
  • AIOM: to concatenate, minify and cache our assets
  • MarkupSEO: the SEO solution for PW
  • MarkupGoogleMap: to embed a Google Map on your pages
  • ProcessSlider: to create image sliders for your pages
  • ProcessHannaCode: to insert any complex HTML, Javascript or PHP output in your …
Read More
Basic ProcessWire website workflow - Part Two


Following the Part One.

In the previous article we have set the foundations, now it’s time to actually code the pages our basic website.

Template Inheritance

Let’s start by explaining the concept of template inheritance. The Smarty documentation provides a nice explanation of this approach, which allows the developer/designer to compose each page by writing only the necessary code and inheriting or including the common parts that are shared. …

Read More
Test Laravel filesystem storage with Virtual File System


Since Laravel 5, the filesystem operations are abstracted thanks to the Flysystem PHP package by Frank de Jonge. This integration provides simple drivers for working with local filesystems, Amazon S3, and other Cloud Storage. The API remains the same for each system therefore is really simple to swap between each storage option.

Testing the filesystem is not an easy task. I covered some of the challenges in a previous blog post, but luckily we have a couple of tools …

Read More
SQLite In-Memory Database for Unit Tests in Laravel


When testing your code (and this is particularly true for functional tests), even if you mock most of the database iteractions, at some point you need to hit the persistent layer of your application in order to ensure that everything works correctly. In these cases you obviously are not willing to make definitive changes to your development database each time you run a test.

Luckily for us Laravel 5 provides two useful methods to solve this problem:

  • Database …
Read More