Laravel

Laravel String Helper Function: str_replace_first

Laravel The replaceFirst helper method is used to replace the first occurrence of a given $search string with the provided $replace string in the $subject string. All three parameters are required and must be...

Laravel String Helper Function: str_replace_last

Laravel The replaceLast helper method is the logical opposite of the replaceFirst helper method. It is used to replace the last occurrence of a given $search string with the provided $replace string in the $subject...

Laravel String Helper Function: substr

Laravel The substr helper method is a convenient helper built on top of PHP's mb_substr function (unlike PHP's mb_substr function, substr does not provide a way to change the encoding that is used) that is used to...

Laravel String Helper Function: title

Laravel This method will convert the given $value to look like a traditional print title. This method essentially will transform the entire $value to its lower cased equivalent and then uppercase the first character of...

Laravel String Helper Function: ucfirst

Laravel The ucfirst helper method is used to uppercase the first letter of a string. It defines only one parameter—$string—which is the string that should have its first letter upper cased. This helper method differs...