Source: www.amitmerchant.com

The new squish() helper in Laravel 9.x
Oftentimes, we need to trim the user-entered input to remove the additional white spaces around the string. The defacto method we could use to accomplish this in PHP is the trim() method which can strip whitespace (or other characters) from the beginning and end of a string like so.
Newsletter

Get the latest Laravel/PHP jobs, events and curated articles straight to your inbox, once a week

Fathom Analytics | Fast, simple and privacy-focused website analytics. Fathom Analytics | Fast, simple and privacy-focused website analytics.
Achieve superior email deliverability with ToastMail! Our AI-driven tool warms up inboxes, monitors reputation, and ensures emails reach their intended destination. Sign up today for a spam-free future. Achieve superior email deliverability with ToastMail! Our AI-driven tool warms up inboxes, monitors reputation, and ensures emails reach their intended destination. Sign up today for a spam-free future.
Community Partners