PHP code example of shonetow / imena-po-padezima-laravel

1. Go to this page and download the library: Download shonetow/imena-po-padezima-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/ */

    

shonetow / imena-po-padezima-laravel example snippets


'providers' => [
    Shonetow\Padezi\PadezServiceProvider::class,
];

'aliases' => [
    'Padez' => Shonetow\Padezi\Padez::class,
];


$ime = 'Predrag';
$pol = 2;
    
echo Padez::nominativ($ime); // Predrag
echo Padez::genitiv($ime, $pol); // Predraga
echo Padez::dativ($ime, $pol); // Predragu
echo Padez::akuzativ($ime, $pol); // Predraga
echo Padez::vokativ($ime, $pol); // Predraže
echo Padez::instrumental($ime, $pol); // Predragom
echo Padez::lokativ($ime, $pol); // Predragu

php artisan vendor:publish