January 23rd, 2023 — Using accessors to return Enums from Laravel model attributes? There's an easier way.
January 11th, 2023 — If you're working with Carbon dates, chances are your tests are going to fail at some point unless you're sure of the value returned from Carbon's now() function.
January 7th, 2023 — If you have (or want to implement) forms that autosave as a user types, there's a really important consideration to make when making requests to an API – the amount of requests you send.
January 4th, 2023 — Sure, it's pretty simple. But you're going to need check at some point.
April 15th, 2022 — Friendships between users in an app is a pretty easy concept to grasp (you add me and we're friends), but to implement it properly isn't as straightforward.
January 29th, 2022 — If you've tried to use 'orderBy' on a previously ordered query in Laravel, you'll probably find it doesn't work. There's a great reason for that, which we'll explain at the end of the post.
January 28th, 2022 — By default, Laravel Valet doesn't use HTTPS. That's great, but if anything you're developing with locally requires HTTPS to be enabled, you're going to need it.
January 28th, 2022 — I use Laravel Valet for day-to-day development, and I recently got stuck getting Laravel Mix HMR (Hot Module Replacement) to work while I had HTTPS enabled through the 'valet secure' command.
November 21st, 2021 — Nested data is a pain point for a lot of developers. Relationships, eager loading and recursively iterating and displaying hierarchical data is enough to cause a headache.
November 13th, 2021 — If you're dealing with plain array data, it often makes sense to convert it to a Laravel Collection so you can make use of the myriad helpers on the Collection class.
July 14th, 2021 — If statements are evil and should be avoided at all costs. Just kidding – but reducing the number of them can increase the readability/size of your code.
July 11th, 2021 — I recently found myself needing to replicate a database record in Laravel. Turns out, there's a really easy way to achieve this.