PHP code example of zendraxl / laravel-string

1. Go to this page and download the library: Download zendraxl/laravel-string library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

zendraxl / laravel-string example snippets


$title = Str::title(Str::replaceArray('_', [' '], Str::snake('fooBar')));

$title = (new Str('fooBar'))->snake()->replaceArray('_', [' '])->title()->get();

$title = str('fooBar')->snake()->replaceArray('_', [' '])->title()->get();

$title = str('fooBar')->snake()->replaceArray('_', [' '])->dd()->title()->get();