Join WhatsApp ChannelJoin Now

str lower() function example in Laravel

Hi,

Today, i we will show you str lower() function example in laravel. This article will give you simple example of str lower() function example in laravel. you will learn str lower() function example in laravel. So let’s follow few step to create example of str lower() function example in laravel.

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"

I hope it will assist you…

Recommended Posts