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

Glimpse streamlines Laravel development by seamlessly deploying GitHub pull requests to preview environments with the help of Laravel Forge. Glimpse streamlines Laravel development by seamlessly deploying GitHub pull requests to preview environments with the help of Laravel Forge.
Fathom Analytics | Fast, simple and privacy-focused website analytics. Fathom Analytics | Fast, simple and privacy-focused website analytics.
Shirts painstakingly handcrafted by under-caffeinated developers. Shirts painstakingly handcrafted by under-caffeinated developers.
Community Partners