helpers refactoring

This commit is contained in:
Peter Papp
2021-03-31 08:27:28 +02:00
parent 6ac6528243
commit a8fa3694be
30 changed files with 85 additions and 211 deletions

View File

@@ -151,7 +151,7 @@ function get_invoice_number()
$invoices = \App\Invoice::all();
if ($invoices->isEmpty()) {
return Carbon::now()->year . '001';
return now()->year . '001';
} else {
return (int)$invoices->last()->order + 1;
}
@@ -589,11 +589,10 @@ function get_image_meta_data($file)
*/
function get_default_language_strings()
{
$license = get_setting('license') ?? 'extended';
return collect(
config('language_strings.' . strtolower($license))
);
return collect([
config("language-strings.extended"),
config("language-strings.regular")
])->collapse();
}
/**