MrPunyapal
MrPunyapal

Punyapal Shah

Verified

@MrPunyapal

Laravel Engineer • Core Team @ Pinkary & Pest • Founder @ Laravel Artisans • Open Source • Building tools & sharing what I learn.
2K Posts 20K Views
  • No matching results...
  • Searching...

/ 255

Laravel Tip 💡

If your model uses ULIDs, Laravel 13.25 adds foreignUlidFor() to make foreign key columns cleaner.

Instead of manually defining the ULID column and foreign key:

$table->foreignUlidFor(User::class);

One less thing to repeat in your migrations.
image

My site was flickering a lot, and I thought it was just normal with Vite or the setup I have, but then one of my friends pointed out that it wasn't normal and explained why it was flickering. I took it seriously, found some issues, and here is how I solved them.
mrpunyapal.dev/tips/css-prevent-navigation-layout-shift-flicker

42

Laravel Tip 💡

Repeating the same audit fields across migrations? Define them once with a custom Blueprint macro, then reuse them with $table->auditFields().

One place to maintain common migration fields, instead of repeating them everywhere.
image

GitHub Actions Tip 💡

Need to trigger a workflow in another repository?

We use repository_dispatch to automatically update mrpunyapal.dev/tips whenever the tips repo changes.

One repo can trigger another repo's workflow with a custom event. 👀
image