It is interesting to know that there are so many Functions that will help you in your next projects I found it from this source https://www.youtube.com/watch?v=_XS8kxTuq_Q and wanted to share this wonderful information with you // echo ucfirst('john'); // Result: "John" echo lcfirst('John'); // Result: "john" echo strtolower('John Smith'); // Result: "john smith" echo strtoupper('john smith'); // Result: "JOHN SMITH" echo ucwords('john smith'); // Result: "John Smith" // Laravel helpers: echo Str::camel('variable_name'); // Result: "variableName" echo Str::snake('variableName'); // Result: "variable_name" echo Str::kebab('variableName'); // Result: "variable-name" echo Str::slug('Some article title'); // Result: "some-article-title"

'|'; // Result: "With spaces " echo '|'. rtrim(' With spaces '). '|'; // Result: " With spaces" echo substr(' With spaces ', 1, 4); // Result: " With" echo substr_replace(' With spaces ', 'Without', 1, 4); // Result: " Without spaces " echo substr_count('with spaces and with more', 'with'); //Result: 2

'true' : 'false'; // Result: "true" echo strstr('My Abc', 'a')?: 'not found'; // Result: "not found" echo stristr('My Abc', 'a')?: 'false'; // Result: "Abc" echo strpos('Abcdefg', 'c'); // Result: 2 echo stripos('ABCdefg', ); // Result: 1 echo strrpos('AbcAbc', ); // Result: 5 echo strripos('AbcAbc', 'a'); // Result: 3
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