Tag: laravel
I needed to create a validation rule in Laravel that would accept either of
the two inputs, but not both and at least one had to be supplied. In other
words, I had to apply the XOR logic operation on them:
ABXOR
000
011
101
110
The search results did offer many solutions but I d…
Testing if the command was actually scheduled might be a controversial
question. Should we test if the scheduler is working and running tasks on
time? Obviously no, it provided via framework and we can even see that
the tests are present
and
integrate together.
But there is a par…
What I've found myself usually doing when working with Queues in Laravel is
a need to run jobs manually. Especially the jobs that have no arguments,
usually some maintenance tasks like pruning excess logs generating a
suggestions for user. These kind of jobs are a great candidate…
There are some quite important functions that are being very commonly used
to transform data, even across languages, that modern approaches to solving
problems greatly prefer. Many things in theory could fit such definition,
but right now I am talking about map, reduce or even fi…
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…
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…
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 …