1. Go to this page and download the library: Download oblak/vocative-laravel 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/ */
use Oblak\Vocative\Facades\Vocative;
// Transform a name to vocative case
echo Vocative::make('Милица'); // "Милице"
echo Vocative::make('Марко'); // "Марко"
// Force transformation (bypass dictionary)
echo Vocative::make('Лука', true); // Forces transformation even if in dictionary
// config/vocative.php
return [
'dictionary' => [
'CUSTOM_NAME' => 'CUSTOM_VOCATIVE_FORM',
'Лука' => 'Луко',
],
'ignore_dictionary' => false, // Set to true to always force transformation
];