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



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()
        $converted1 = Str::title('a nice title uses the correct case');
        // output - A Nice Title Uses The Correct Case

        $converted2 = Str::title('laravel str title() function example');
        // output - Laravel Str Title() Function Example

May this example help you.