A short summer writing pause

Past week I've had a few days that I focused solely on work and family and did not reserve any time for the blog. There were multiple reasons for this, but the main was that it is summer and there are almost no restrictions whatsoever. I did some camping by the lake I was driving…

Prevent push when skipping Cypress tests pt.2

Just a quick update to the article I wrote some time ago that could be considered as part one on this topic. The problem outlined in the article is basic. When developing Cypress tests, it is helpful to use the .only(), a Cypress modifier to exclude other tests to see results for…

Convenient relationship factories in Laravel 8

One of the changes in Laravel 8 was the overhaul of the model factories which led to factories being namespaced. Seeders are also affected in the same way, but this is a different topic for now. Now I did not paid enough attention to grasp why such change was introduced or even n…

A basic InertiaJS test macro

I've made a macro for the Illuminate\Testing\TestResponse class that I put into the TestCase.php file which is a part of pingcrm-svelte. I currently use this short macro in basically all HTTP tests for Inertia related endpoints in Laravel, so unless I am doing something wrong, it…

CORS problems with InertiaJS and Browsersync

InertiaJS is a really impressive approach to building fullstack web applications. I've probably first heard about it in the Javascript Jabber from devchat.tv in episode 443. Adopting it was really straightforward as I had previous experiences with Laravel, TailwindCSS and Svelte …

Prettier PHP plugin in vim

After spending a few hours trying to make chained methods in PHP arrange itself below one and each other in a tidy manner, I have finally found a solution. In other words, on a file save I wanted to go from this: $this->user->account->organizations()->saveMany(Organiz…

Vim filter contents replaced with an error

One of the features of vim is it's ability to filter contents of the file through a command and return the output back to the buffer. This could be used for example for fixing the indentation on the file or generally formatting the document. Part of the official documentation for…