mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-06-02 21:14:35 -04:00
* Remove unnecessary save() on invoice * Update copyright * Working on Credit Repository * Implement credits as a paymentable entity * Add credit_id to transformer * fix rules for update payment * Fix random deleted_at keys in transformers * Fix for password_protect check
29 lines
747 B
PHP
29 lines
747 B
PHP
<?php
|
|
/**
|
|
* Invoice Ninja (https://invoiceninja.com)
|
|
*
|
|
* @link https://github.com/invoiceninja/invoiceninja source repository
|
|
*
|
|
* @copyright Copyright (c) 2020. Invoice Ninja LLC (https://invoiceninja.com)
|
|
*
|
|
* @license https://opensource.org/licenses/AAL
|
|
*/
|
|
|
|
use Illuminate\Support\Facades\Cache;
|
|
|
|
/**
|
|
* Returns a custom translation string
|
|
* falls back on defaults if no string exists
|
|
*
|
|
* //Cache::forever($custom_company_translated_string, 'mogly');
|
|
*
|
|
* @param string translation string key
|
|
* @return string
|
|
*/
|
|
function ctrans(string $string, $replace = [], $locale = null) : string
|
|
{
|
|
//todo pass through the cached version of the custom strings here else return trans();
|
|
|
|
return trans($string, $replace, $locale);
|
|
}
|