In this tutorial, we will learn Laravel str pluralStudly() function Example
solution
$pluralStudly1 = Str::pluralStudly('VerifiedHuman'); print_r($pluralStudly1); // output - VerifiedHumans $pluralStudly2 = Str::pluralStudly('UserFeedback'); print_r($pluralStudly2); // output - UserFeedback
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()
{
$pluralStudly1 = Str::pluralStudly('VerifiedHuman');
print_r($pluralStudly1);
// output - VerifiedHumans
$pluralStudly2 = Str::pluralStudly('UserFeedback');
print_r($pluralStudly2);
// output - UserFeedback
}
}
May this example help you.