laravel string check string first character code example
Example 1: php get first character of string
$firstStringCharacter = substr("hello", 0, 1);
Example 2: php nth characters from end of string
$rest = substr("abcdef", -3, 1); // returns 'd'