Hello Devs, 

In this tutorial, we will learn Laravel str lower() function Example

The str lower() method converts a string to its lower form. The Str::lower method converts the given string to lowercase:

Follow this step-by-step guide below. 

Example:

<?php

namespace App\Http\Controllers;

use Illuminate\Http\Request;
use App\Http\Controllers\FileController;
use Illuminate\Support\Str;

class HomeController extends Controller
{
    /**
     * Show the application dashboard.
     *
     * @return \Illuminate\Contracts\Support\Renderable
     */
    public function index()
    {
        $lower1 = Str::lower('Boy');
        
        print_r($lower1);
        // output - boy

        $lower2 = Str::lower('CAR');
        
        print_r($lower2);
        // output - car

        $lower3 = Str::lower('CHILD');

        print_r($lower3);
        // output - child

    }
}


Output:

"boy"
"car"
"child"


May this example help you.