Code snippets
Code snippets
Copy-ready answers to everyday coding questions, each with a short explanation. Laravel, PHP, JavaScript, SQL, Bash and more.
2 snippets tagged #currency · Show all
PHP
October 10, 2026
Laravel Concurrency::run execute tasks in parallel
Runs several closures at the same time and returns their results in order. Use it when a page needs independent slow calls, such as two reports or two APIs, and...
<?php
use Illuminate\Support\Facades\Concurrency;
PHP
October 10, 2026
Laravel Number helper format numbers as 1.2K, 3M, file sizes
Built-in formatting for abbreviations, currency, file sizes and percentages, so you don’t need to write helpers. Use it in views and API responses. Needs Larave...
<?php
use Illuminate\Support\Number;