Auteur: michiel

Laravel Middleware sorting

At rare times, according to the documentation, you want to control the order in which middleware is run. Middleware is sorted to make sure that encryption/decryption of the session runs before the session starts, which runs before authentication, which runs before authenticating the session, etc. By default, all your application middleware is run after all…
Lees meer

2023-07-18 0

Laravel Route bindings

Laravel allows you to explicitely and implicitely bind parameters in the route to models in your controller methods. This includes all kinds of scoping and configuration, but this only works if your route can determine the base model of the route parameter. There are basically two ways of configuring this base model. The first one…
Lees meer

2023-06-30 0

Laravel Resource Routes

And not just regular routes, but routes with modified resource names. So, by default you create a standard resource route using a standard resource using the simple construct: e.g.: This will create a slew of default routes for the resource linked to the indicated controller. In the constructor of the controller, you can link authorization…
Lees meer

2020-05-30 0

Laravel Soft Deletes

While investigating the Laravel framework I ran into the following problem: I have a model for which I enabled Soft Deletes. I want to allow the user to restore those models as well, using Soft Delete as a view-filtering option. Usually, the model should remain invisible from the overview and is only retained, because it…
Lees meer

2020-05-13 0

Guest Wifi Login on Ubuntu

My laptop is still running Ubuntu 16.04LTS and I am running into some compatibility issues that are hopefully fixed in more up to date releases in 2020. One of these issues is logging into free guest WiFi, in this case of KPN. Apparently the captive portal detection feature of Ubuntu, nor Chromium, succeeds in finding…
Lees meer

2020-05-11 0

Ansible and MySQL 8

I am trying to setup a simple installation using MySQL version 8 through Ansible. However, this simple setup is balking at me and failing to create databases or users, even though I use a simple root-no-password-default-socket setup. After going through pages of similar issues, I decided to delve into the Ansible module and eventually in…
Lees meer

2019-02-15 0

Vagrant, Docker and Ansible revisited

In an earlier post I talked about the combination of Vagrant, Docker and Ansible. The final goal of that exercise was to have a Vagrant file that brings up several docker containers that are able to communicate with each other. And then we provision the containers using Ansible, all in one go. Using Vagrant, you…
Lees meer

2018-02-09 0

COmanage enrollment using auth_mod_mellon

Welcome in the world of SAML federation and Single Sign On. COmanage is a work-in-progress revolving around the use-case of managing groups of people (entities?) in a virtual organisation. While this use case has been solved a million times in the technological domain, it is somewhat more complex if you have to work with less…
Lees meer

2017-11-30 0

Vagrant, Docker and Ansible

For a high end customer, I had to delve into the world of Vagrant, VirtualBox, Libvirt and Docker. The request was to create a single Vagrantfile that would be able to provision the multi-host application to both host machines running through VirtualBox and Libvirt on one side and Docker containers on the other side. Now,…
Lees meer

2017-11-03 0

DIY Lasertag

As my kids grow up, my interest in electronics and embedded development gives me an excuse to delve into the intrinsics of do-it-yourself lasertag. Although not that complicated in its essence, it provides several challenges on both hardware and software matters that give me ample opportunity to learn. The MilesTag system is generally considered the…
Lees meer

2017-10-22 0