Skip to content
The Erag Blog

Build better Laravel apps, one real problem at a time.

Hands-on guides for Laravel, Inertia, Vue and React. Every post starts with a problem you will actually run into, like fake sign-ups, messy phone numbers or untranslated error messages, and ends with working code you can drop into your app today.

31 articles

Best practices

A Better Laravel Signup Form for SaaS Apps (A Practical Checklist)

A practical Laravel signup form checklist for SaaS apps. Block burner emails, collect phone numbers per country, show clear feedback and translate messages.

· 7 min read
TutorialText Editor Vue

A Dependency-Free Rich Text Editor for Vue 3: Setup, Toolbars and v-model

Add a Vue 3 rich text editor with v-model, per-screen toolbars, readonly mode and instance methods, using a component whose only peer dependency is Vue.

· 7 min read
TutorialText Editor React

A Lightweight WYSIWYG Editor for React: Controlled, Uncontrolled and Inertia

Set up a React WYSIWYG editor for React 18 and 19 as a controlled or uncontrolled input, with Next.js, Inertia useForm, autosave and custom toolbars.

· 7 min read
TutorialPhone Number React

A Phone Number Input Hook for React (Country Codes Included)

Build a React phone number input with country selection, calling codes and length validation using the headless usePhoneNumber hook and your own JSX.

· 7 min read
TutorialLaravel PWA

Add an Install App Button to Your Laravel Site

How the PWA install prompt works in Laravel. Use the built-in floating button, restyle it, handle iOS Safari, or build your own Install app button in Vue.

· 6 min read
TutorialPhone Number Vue

Build a Country-Aware Phone Input in Vue 3

Build a Vue phone number input with a country selector, calling code, length checks and a clean v-model, using the headless usePhoneNumber composable.

· 7 min read
GuideLaravel Lang Sync Inertia

Build a Multilingual Laravel Inertia App

Build a multilingual Laravel Inertia app with locale middleware, a language switcher, translated validation errors and lang files that scale with your pages.

· 6 min read
Use caseText Editor React

Build an Email Template Editor in React With Merge Tags and Laravel

Let your team edit transactional emails in a React email template editor with merge tags and starter templates, then resolve and send them safely from Laravel.

· 8 min read
TutorialLaravel Inertia Forms

Build Inertia Forms From a Single PHP Class

Build Laravel Inertia forms from one PHP class with erag/inertia-forms. Fields, layout, rules and permissions live in Laravel, and one component renders them.

· 6 min read
GuidePhone Number React

E.164 Phone Number Format: How to Store and Display Phone Numbers

Learn the E.164 phone number format, how it differs from national display, and how to store and show phone numbers from web forms, with a React example.

· 7 min read
ComparisonPhone Number Vue

Headless Phone Input vs Ready-Made Components

Compare a headless phone input with ready-made phone components on styling, accessibility, bundle size, validation depth and upkeep, and learn when each fits.

· 6 min read
TutorialLaravel Inertia Toast

How to Add a Confirm Dialog Before Deleting in Laravel Inertia (Vue or React)

Build an Inertia confirm dialog for delete buttons in Laravel: await the user's choice in Vue 3 or React, send the request, then flash a toast from the server.

· 7 min read
TutorialLaravel Inertia Toast

How to Add Toast Notifications to a Laravel Inertia App (Vue or React)

Add Inertia toast notifications to Laravel with a toast() helper in your controllers and one plugin for Vue 3 or React. Full setup, options and fixes.

· 7 min read
TutorialVue Toastification

How to Add Toast Notifications to a Vue 3 App Without the Bloat

Add Vue 3 toast notifications with @erag/vue-toastification. Install it, register the plugin, call useToast() and set duration and position per toast.

· 7 min read
TutorialLaravel Disposable Email

How to Block Disposable Emails in Laravel (With a Pest Test)

Block disposable emails in Laravel with one validation rule. Install the package, protect registration, add your own domains and keep the list synced.

· 6 min read
TutorialVue Toastification

How to Build a Vue Confirm Modal You Can Await

Build a Vue confirm modal you can await in Vue 3. Replace v-if state and emit handlers with one async call, plus delete and unsaved-changes examples.

· 7 min read
TutorialLaravel PWA

How to Turn a Laravel App Into a PWA

A step-by-step Laravel PWA setup. Install the package, configure the manifest, add a 512x512 logo, register the service worker and test it over HTTPS.

· 6 min read
GuidePhone Number Vue

How to Validate International Phone Numbers in Vue 3

A practical guide to Vue phone validation for international numbers, covering country length rules, error timing, accessibility and matching checks in Laravel.

· 7 min read
GuideLaravel Disposable Email

Laravel Email Validation: RFC, DNS and MX Explained

Laravel email validation with DNS and RFC modes explained. Learn what rfc, strict, dns and spoof check, when MX lookups help and when they slow you down.

· 6 min read
TutorialText Editor Vue

Mentions and Merge Tags in a Vue Text Editor, With a Laravel Backend

Add @mentions with Laravel user search and double-brace merge tags to a Vue editor, then read mentions from the saved HTML to send notifications.

· 7 min read
TutorialLaravel Inertia Forms

Multi-Step Form Wizards in Laravel Inertia

Build a multi step form in Laravel Inertia with server-checked steps, conditional steps and one final submit, using fieldsets in a single PHP form class.

· 6 min read
GuideLaravel Inertia Forms

One Set of Validation Rules for Laravel and Inertia

Stop duplicating Laravel Inertia validation in PHP and Vue. Generate rules from field definitions, skip hidden fields, and test them with Pest.

· 7 min read
TutorialText Editor Vue

Rich Text Image Uploads With Laravel and Vue: Upload, Paste, Resize and Delete

Wire a Vue editor image upload to Laravel with a form request, public disk storage, progress reporting, CSRF-safe requests and safe server-side deletion.

· 7 min read
GuideLaravel Lang Sync Inertia

Sharing Laravel Lang Files With Your Frontend

Two ways to get Laravel lang files to your frontend, Inertia props or exported JSON, and how to choose, configure and build with each one.

· 6 min read
Use caseLaravel Disposable Email

Stop Free Trial Abuse With Burner Email Checks

Free trial abuse often starts with a burner inbox. Block disposable emails at sign-up, gate trials, log what you catch and grow your own Laravel blocklist.

· 6 min read
Best practicesText Editor React

Store Rich Text Safely: How to Sanitize Rich Text HTML in Laravel

Why the editor's browser sanitizer is not enough, and how to sanitize rich text HTML in Laravel with an allow-list, a form request, Pest tests and a CSP header.

· 8 min read
TutorialPhone Number React

Style a React Phone Input With Tailwind CSS

Style a React phone input with Tailwind CSS as one input group, with focus rings, error and disabled states, dark mode and a calling code prefix.

· 7 min read
Best practicesVue Toastification

Toast Notification UX: When to Use a Toast and When to Skip It

Toast notification UX rules that hold up: which messages belong in a toast, how long to show them, where to place them and how to keep them accessible.

· 7 min read
GuideLaravel Inertia Toast

Turn Laravel Flash Messages Into Inertia Toasts Without Rewriting Controllers

Show Laravel flash messages in Inertia as toasts: why they vanish, which session keys the package reads, one-toast limits, validation errors and Pest tests.

· 7 min read
TutorialLaravel Lang Sync Inertia

Use Laravel Translations in Inertia Vue and React

Use Laravel translations in Inertia Vue and React pages with syncLangFiles(), __() and trans(), including placeholders, plurals and missing keys.

· 6 min read
GuideLaravel PWA

Web App Manifest and Service Worker in Laravel

What the web app manifest and service worker do in a Laravel PWA, how config/pwa.php becomes manifest.json, and how to change the name and icon at runtime.

· 6 min read

Written by Amit Gupta. Code samples are MIT licensed.