PHP code example of softinvest / declension-nouns

1. Go to this page and download the library: Download softinvest/declension-nouns 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/ */

    

softinvest / declension-nouns example snippets


 Drandin\DeclensionNouns\DeclensionNounsServiceProvider::class,

 'DeclensionNoun' => \Drandin\DeclensionNouns\Facades\DeclensionNoun::class,

DeclensionNoun::make(4, "год");

DeclensionNoun::make(5, "страница");

DeclensionNoun::make(-304, "рубль");

DeclensionNoun::make(5, "год");

DeclensionNoun::makeOnlyWord(5, "год");

    
    'телефон' => [
                'телефона',
                'телефонов'
            ],
    

   DeclensionNoun::addToDictionary('телефон', 'телефона', 'телефонов');

 php artisan vendor:publish --tag=config

 php artisan config:cache

 php artisan ide-helper:generate