Arrays are a useful toolt to store multiple values. You can access a specific value in an array using a key. By default, if you don’t specify keys, they will be numeric and start at zero (not one);
Arrays are a useful toolt to store multiple values. You can access a specific value in an array using a key. By default, if you don’t specify keys, they will be numeric and start at zero (not one);
PHP Storm has a built in terminal window which you can use to run Laravel artisan commands, but there is a quick configuration change that you can do to make it even easier to run artisan commands.
Recently I built a Laravel package containing Blade Components for use with the Bulma frontend framework, called Bulma Blade UI. As part of building the package I wanted to ensure that there were tests to ensure that, firstly, the components rendered without errors, and secondly, that the attributes overrode the settings as expected.
Testing validation rules can become quite tiresome pretty quickly if you have to write each test manually. Luckily I’ve found a nice method that allows you to simplify your validation rule tests when using Laravel Livewire components. For this example we have a form that allows a user to update their profile information with a Livewire ProfileForm component.
In the previous article we discussed the if statement, where it said you can have many different elseif statements if you wanted to handle many different scenarios, but it gets to a point where you should consider swapping to a switch statement.
This is the first of a series of posts I will write that go back to basics and introduce the fundamentals of PHP. In this article I’m going to start with the PHP if statement.
Latest Posts
I have been using prettier for a few years to automatically format code, especially JavaScript and TypeScript projects, as it helps standardise the output on a shared code project. I have maintained a few different Jekyll themes over the years and wanted to use the power of prettier to automatically format code consistently.
I decided to try out React Native to build a native app and see how it works. I’m an experienced web developer but have limited knowledge of apps. I helped build an app using Apache Cordova and PhoneGap many (many) years ago and also worked on another app using the ionic framework a few years later. If I’m honest I can’t really remember how they worked as it was so long ago, so it was kind of like starting fresh for me.
A while ago I wrote about how to use a many to many relationship in Laravel, (all the way back in April 2019). Now I want to build on this example and show how you can query many to many relationships, but also how you can add additional constraints to the query to further filter your results.