WebDevRichard's profile picture. Web Developer

Richard Jeffery

@WebDevRichard

Web Developer

Richard Jeffery repostou

If you're using Tailwind, don't sleep on child selectors. They clean up your styles and eliminate repetition. Vibe coding agents aren't smart enough to do this. (if you're using CSS, keep scrolling)

DavidKPiano's tweet image. If you're using Tailwind, don't sleep on child selectors. They clean up your styles and eliminate repetition.

Vibe coding agents aren't smart enough to do this.

(if you're using CSS, keep scrolling)

Richard Jeffery repostou

Laravel 12.8.0 introduced `Rule::anyOf()`, allowing a field to be validated against multiple predefined rule sets, ensuring that at least one set fully passes. Massively simplifies potentially complex validation logic. In this example, we'll allow max 10MB for videos and 2MB…

laracasts's tweet image. Laravel 12.8.0 introduced `Rule::anyOf()`, allowing a field to be validated against multiple predefined rule sets, ensuring that at least one set fully passes.

Massively simplifies potentially complex validation logic.

In this example, we'll allow max 10MB for videos and 2MB…

Richard Jeffery repostou

See, even Wes Bos doesn't know it all! He's still out here sharing what he's learning! You can do the same. And yes, people will likely tell you that they already knew that. That's ok.

🤯 How am I just finding out about display: contents; Suuuuper handy for CSS Flexbox + Grid where the children aren't direct descendants.



Richard Jeffery repostou

Needed to find out if there’s a way to dynamically change your database when working with Laravel Eloquent, lo and behold @fideloper has me covered! fideloper.com/laravel-multip…


Richard Jeffery repostou

If you're working on an app locally that requires several S3 disks, you can add what I call a "filesystem mock" feature, enabled via your app config. Benefits: - Don't need AWS credentials - Don't need an internet connection - Don't pollute the S3 buckets with test files

heystevebauman's tweet image. If you're working on an app locally that requires several S3 disks, you can add what I call a "filesystem mock" feature, enabled via your app config.

Benefits:
- Don't need AWS credentials
- Don't need an internet connection
- Don't pollute the S3 buckets with test files

Richard Jeffery repostou

Understanding OAuth OAuth is an open standard that allows users to grant limited access to their data on one site to other sites or applications without exposing their passwords. It has become the backbone of secure authorization across the web and mobile apps. The OAuth…

sahnlam's tweet image. Understanding OAuth

OAuth is an open standard that allows users to grant limited access to their data on one site to other sites or applications without exposing their passwords. It has become the backbone of secure authorization across the web and mobile apps.

The OAuth…

Richard Jeffery repostou

Responsive HTML table with sticky columns and mobile view created using only CSS and HTML ✨ CodePen link below 👇


Richard Jeffery repostou

💡Quick Eloquent tip: If you have a many-to-many relationship with a pivot table and extra columns, you can use the updateExistingPivot to update the extra column's value. In this example, I need to update the status of a given subscriber:

mmartin_joo's tweet image. 💡Quick Eloquent tip: If you have a many-to-many relationship with a pivot table and extra columns, you can use the updateExistingPivot to update the extra column's value.

In this example, I need to update the status of a given subscriber:

Richard Jeffery repostou

Now that everyone is playing around with @pestphp, let's not forget to perform architecture tests for clean code, my friends! 🧼

LaravelJutsu's tweet image. Now that everyone is playing around with @pestphp, let's not forget to perform architecture tests for clean code, my friends! 🧼

Richard Jeffery repostou

Tired of manually formatting your Laravel code? Laravel Pint is the answer. Built on top of PHP-CS-Fixer, it ensures automatic, uniform styling so you can focus on the code. Here's a guide to set it up with PHPStorm and Docker (Laravel Sail), step by step.


Richard Jeffery repostou

Want to ensure code quality for your Laravel project? Set up Larastan! ✅ But, it can be tricky to get PHPStorm and Docker working together with Laravel Sail. Here's how to do it:


Richard Jeffery repostou

Insanely important tip: make sure to specify the PHP version you're using in production in your "composer.json" file. This way, composer will create the "composer.lock" file specifically for that version. Don't skip this step if you want everything to work smoothly.

enunomaduro's tweet image. Insanely important tip: make sure to specify the PHP version you're using in production in your "composer.json" file. This way, composer will create the "composer.lock" file specifically for that version. Don't skip this step if you want everything to work smoothly.

Richard Jeffery repostou

No more excuses not to test! 🚫 Thanks to this code, I'm testing media download from a temporary signed route using Laravel and Pest. 🙌🏼 The perfect combo! 🔥 #laraveltesting #pestphp

LaravelJutsu's tweet image. No more excuses not to test! 🚫 

Thanks to this code, I'm testing media download from a temporary signed route using Laravel and Pest. 🙌🏼

The perfect combo! 🔥 #laraveltesting #pestphp

Richard Jeffery repostou

I know it's been mentioned a million times at this point, but this test is invaluable using @pestphp 2.

joetannenbaum's tweet image. I know it's been mentioned a million times at this point, but this test is invaluable using @pestphp 2.

Richard Jeffery repostou

This is a valid Dockerfile for a NodeJS application. It is also a pile of 💩! We can improve: - 🔒 Security - 🏎️ Build speed - 👁️ Clarity Follow along as we go from 💩 to 🥇! (code in alt text)

sidpalas's tweet image. This is a valid Dockerfile for a NodeJS application. It is also a pile of 💩!

We can improve:
- 🔒 Security
- 🏎️ Build speed
- 👁️ Clarity

Follow along as we go from 💩 to 🥇!

(code in alt text)

Richard Jeffery repostou

The View Transitions API for Single-Page Apps (SPAs) is in Chrome 111 (the new stable)! 😍 Check out @jaffathecake's fantastic guide bit.ly/view-transitio… and this awesome demo from @charca


Richard Jeffery repostou

🔥 Laravel Tip: Just discovered the Laravel 𝘄𝗶𝘁𝗵𝗧𝗼𝗸𝗲𝗻 method to quickly add a bearer token to the request's Authorization header - making API calls so much simpler, faster, and more secure. #Laravel

rukhsardev's tweet image. 🔥 Laravel Tip: Just discovered the Laravel 𝘄𝗶𝘁𝗵𝗧𝗼𝗸𝗲𝗻 method to quickly add a bearer token to the request's Authorization header - making API calls so much simpler, faster, and more secure. #Laravel

Richard Jeffery repostou

For the ones that are using Laravel with Vue and need to use i18n on both backend and frontend. I created this package, Laravel Vue i18n, and the setup is easy as this. Github: github.com/xico2k/laravel…

xiCO2k's tweet image. For the ones that are using Laravel with Vue and need to use i18n on both backend and frontend.

I created this package, Laravel Vue i18n, and the setup is easy as this.

Github: github.com/xico2k/laravel…

Richard Jeffery repostou

🔥 Laravel Tip: Nested Eager Loading on Polymorphic Relationships. Sometimes you need to eager load different relationships depending on the type of model on a polymorphic relationship. This is super easy to do with the `morphWith` method.

cosmeescobedo's tweet image. 🔥 Laravel Tip: Nested Eager Loading on Polymorphic Relationships.

Sometimes you need to eager load different relationships depending on the type of model on a polymorphic relationship.

This is super easy to do with the `morphWith` method.

Loading...

Something went wrong.


Something went wrong.