Download a file through a signed URL
temporarySignedRoute plus the signed middleware. An Inertia Link cannot download the file. Use an anchor.
temporarySignedRoute plus the signed middleware. An Inertia Link cannot download the file. Use an anchor.
Store integer cents. Format with Number::currency on the server and pass a string. Do not add money in JavaScript.
Store UTC. Format with the user's timezone when you send the prop. Do not save local time into a timestamp column.
Set the locale from an allow-list. A query string is not a locale until you have checked it.
Feature::for($user)->active() becomes a boolean prop. The controller checks the same flag before it writes.
Log the subject and the user from the controller. Pass the latest rows as a prop. Do not log a password.
Cache::remember stores a public count. Forget that key when a post is created. Do not cache one user's drafts under a global key.
DB::transaction commits the post and its relations together. Redirect after the closure returns.
upsert writes a batch by a unique key. It skips model events, so a normal Vue form should still use create or update.
simplePaginate omits the total and last_page. The Vue footer uses previous and next only.
A resource collection of a paginator already includes links and meta. Do not paginate those rows again in Vue.
The restore route uses withTrashed() or the binding 404s before your controller runs.
Newsletter
One short email with new guides, release notes worth reading and hand-picked community links. No spam, unsubscribe any time.