Faker PHP is a library that generates random and anonymized data for testing or to bootstrap an application. Faker already provides a lot of generator properties, so-called formatters , out of the box. You can find a list of the available formatters in the official documentation. But what if no formatter aligns with the business logic? In this case, you can register your custom provider to the…
In this post, I'm using Corcel to create a simple blog as a part of a Laravel application with WordPress as the CMS . This setup makes it possible to manage your posts within the WordPress admin interface while using a Laravel application and Corcel to query and render the content. Installing Corcel in a Laravel project Require the latest version of Corcel via Composer: composer require…
We start with a test for the controller of a sample JSON API. Therefore, we scaffold a new integration test using the Artisan make:test CLI command. The test will be in the tests directory of the Laravel application and mirror the architecture of the main application. php artisan make:test Http/Controllers/Api/UsersControllerTest We are going to use a (slightly modified) example from the section…
Getting started with GitHub Actions GitHub rolled out GitHub Actions for everyone in November 2019. GitHub Actions are free to use (up to 2000 minutes per month) for public and private repositories and execute a workflow every time a defined event is triggered on GitHub. GitHub provides quite a lot of webhook events that can trigger a workflow. So let's explore how to automate the steps of our…
When working as a freelance web developer it's important to get things done. I'm working 100% remote and I'm traveling a lot, which means that I'm constantly pulled away from work. This lifestyle is great for a healthy work-life-balance but I still need to make sure the job gets done. When distractions are everywhere it's key to find joy in the work. To accomplish my tasks I aim for three things:…
The common process is writing the code and thinking about the commit message afterward. If you are like me, then the commit message sums up everything you remember working on while skimming through the staged files. This regularly results in commits that aren't logically grouped and everything is just messy enough to not be helpful in the long term. Commit messages like WIP or Bugfixes and minor…
Today I'm introducing the next version of my blog. It took me a while to get it done and I ended up migrating everything from WordPress to Laravel to fit my needs. I haven't written a blog post in a few years, so let's sum things up first. Once upon a time... In 2007, I launched my very first website. I was just so excited to be online but then I realized that frames and tables aren't particularly…
Besides the pre-customized solutions like the Arduino Ethernet Board (retired) or the Arduino Ethernet Shield , there is a favorable alternative to connect an Arduino Board to the internet: the ENC28J60 Ethernet Network Module . As Hans Crijns pointed out , it is possible to connect the Ethernet Module with any Arduino (3.3V or 5V) without level shifting. To connect both boards, wire the pins like…
The main microcontroller is based on the ATmega328 microcontroller like the Arduino Uno Board itself. There are 14 digital input and, respectively, output pins, 6 analog inputs, a 16 MHz crystal oscillator, an ICSP header, a power jack, a reset button and of course, for the Arduino Ethernet Board, the RJ45 connection. But the Arduino Ethernet Board especially differs from the other Arduino Boards…