Suman Shrestha

Snippets | Suman Shrestha

Code Snippets & Insights

104 articles

Alpine.js Magic Properties

Understanding $el, $refs, $dispatch, $nextTick, and $watch in Alpine.js.

Building a Reusable Modal in Alpine.js

Creating an accessible, keyboard-friendly modal component using Alpine.js.

SQLite WAL Mode Explained

Why you should almost always use Write-Ahead Logging (WAL) mode for SQLite in production.

Nginx Rate Limiting Strategy

Protecting your web application from brute-force attacks and abuse using Nginx rate limiting.

Managing State in Alpine.js

Moving beyond component-local state with Alpine.js Stores.

Accessible Forms

Essential guidelines and ARIA attributes for building forms that work for everyone.

Tailwind CSS Container Queries

Moving beyond media queries by styling elements based on their parent container's size using Tailwind CSS.

Optimizing Eloquent Relationships

Using hasOneThrough and hasManyThrough to simplify access intermediate data in Laravel.

Mastering Oracle MATCH_RECOGNIZE

A deep dive into using MATCH_RECOGNIZE for row pattern matching in Oracle SQL.

Explaining LATERAL Joins in Oracle

Learn how and why to use LATERAL inline views in Oracle SQL to reference columns from preceding tables.

Floating Point Validation

Validating floating point numbers in JSON payloads is tricky. Learn about the 'decimal' rule improvements.

Pest Architecture Testing

Ensure your application structure stays clean using Pest's architecture testing features, now included by default.

Mastering Omit and Include Validation Rules

Handle exclusion logic cleanly in Laravel validation without complex conditional callbacks.

SQLite by Default

Why Laravel 11 chose SQLite as the default database for new applications and why it is production-ready for many use cases.

The Defer Helper

Use the defer() helper to execute code after the HTTP response has been sent to the user, without setting up a queue.

Loading more articles...

-

Need one on one help with Laravel and its ecosystem?

Talk to me now if you need my help. Click here