今日已更新 185 条资讯 | 累计 40290 条内容
关于我们

标签:#r

找到 34279 篇相关文章

AI 资讯

Laravel Precognition: Live Validation That Reuses Your Backend Rules

Book: Decoupled PHP — Clean and Hexagonal Architecture for Applications That Outlive the Framework Also by me: Thinking in Go (2-book series) — Complete Guide to Go Programming + Hexagonal Architecture in Go My project: Hermes IDE | GitHub — an IDE for developers who ship with Claude Code and other AI coding tools Me: xgabriel.com | GitHub You have two copies of the same rules. One lives in a StoreUserRequest on the server. The other lives in a Zod schema, or a Yup object, or a pile of required attributes, on the front end. They started identical. Then someone bumped the password minimum from 8 to 12 on the backend and forgot the client. Now the form says the password is fine, the user clicks submit, and a 422 bounces back with an error the UI never predicted. That drift is the whole reason live client-side validation is annoying to maintain. You are keeping two rulesets in sync by hand, and the sync breaks quietly. Laravel Precognition removes the second copy. The front end asks the server "would this pass?" before the user submits, and the server answers using the exact same validation rules the real request will run. What a precognitive request actually is A precognitive request is a normal HTTP request to your real endpoint, tagged with a Precognition: true header. Laravel sees the header, runs the route's middleware and validation, and then stops before your controller does any real work. It never writes a row. It never sends an email. It runs the rules and returns the verdict. Success comes back as 204 No Content with a Precognition-Success: true header. Failure comes back as a normal 422 with the same JSON error bag your form submit would produce. Same rules, same messages, same field names. There is no second schema to drift. The lifecycle is worth holding in your head: Front end sends the form state to the real URL with Precognition: true . Middleware runs. FormRequest validation runs. Laravel short-circuits: your controller body never executes. Response is

2026-07-03 原文 →
AI 资讯

Show HN: Visualize Model Spikiness in 3D

Models are referred to as 'spiky' entities - they have relative strengths and weaknesses. Model map visualizes these strengths and weaknesses in 3D and give you the ability to fly around this 3D space (there is a hidden Star Wars themed mini game for pilots brave enough to try). Spikiness is an intuitive mental model but the typical way of visualizing this spikiness is a generic table. Is this useful? Maybe? Is it fun? Yes. You should try the flight controls. Click anywhere then use WASD + mouse

2026-07-03 原文 →
AI 资讯

Show HN: Bramble – Local-first password manager

I'm currently working on Bramble, an open source password manager with P2P cross-device sync. Initially I released the Chrome extension, but recently I also published the Android app and iOS is pending Apple's approval. Besides that, the latest version also includes passkey storage for all platforms! About Bramble: It aims to be as feature-rich as all popular and a replacement for cloud-based providers. I don't think we need to store our data in the cloud and be at the whims of companies raising

2026-07-03 原文 →