mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2024-11-14 23:22:52 +01:00
100 lines
3.3 KiB
PHP
100 lines
3.3 KiB
PHP
<?php
|
|
/**
|
|
* Invoice Ninja (https://invoiceninja.com).
|
|
*
|
|
* @link https://github.com/invoiceninja/invoiceninja source repository
|
|
*
|
|
* @copyright Copyright (c) 2024. Invoice Ninja LLC (https://invoiceninja.com)
|
|
*
|
|
* @license https://www.elastic.co/licensing/elastic-license
|
|
*/
|
|
|
|
namespace App\Providers;
|
|
|
|
use App\Models\Bank;
|
|
use App\Models\Country;
|
|
use App\Models\Currency;
|
|
use App\Models\Industry;
|
|
use App\Models\Language;
|
|
use App\Models\PaymentTerm;
|
|
use Illuminate\Support\ServiceProvider;
|
|
use App\DataMapper\EmailTemplateDefaults;
|
|
|
|
class StaticServiceProvider extends ServiceProvider
|
|
{
|
|
/**
|
|
* Register services.
|
|
*
|
|
* @return void
|
|
*/
|
|
public function register()
|
|
{
|
|
|
|
app()->singleton('currencies', function ($app) {
|
|
return Currency::query()->orderBy('name')->get();
|
|
});
|
|
|
|
app()->singleton('languages', function ($app) {
|
|
return Language::query()->orderBy('name')->get();
|
|
});
|
|
|
|
app()->singleton('countries', function ($app) {
|
|
return Country::query()->orderBy('name')->get();
|
|
});
|
|
|
|
app()->singleton('payment_types', function ($app) {
|
|
return PaymentTerm::query()->orderBy('num_days')->get();
|
|
});
|
|
|
|
app()->singleton('industries', function ($app) {
|
|
return Industry::query()->orderBy('name')->get();
|
|
});
|
|
|
|
app()->singleton('banks', function ($app){
|
|
return Bank::query()->orderBy('name')->get();
|
|
});
|
|
|
|
app()->singleton('templates', function ($app){
|
|
return [
|
|
'invoice' => [
|
|
'subject' => EmailTemplateDefaults::emailInvoiceSubject(),
|
|
'body' => EmailTemplateDefaults::emailInvoiceTemplate(),
|
|
],
|
|
'quote' => [
|
|
'subject' => EmailTemplateDefaults::emailQuoteSubject(),
|
|
'body' => EmailTemplateDefaults::emailQuoteTemplate(),
|
|
],
|
|
'payment' => [
|
|
'subject' => EmailTemplateDefaults::emailPaymentSubject(),
|
|
'body' => EmailTemplateDefaults::emailPaymentTemplate(),
|
|
],
|
|
'reminder1' => [
|
|
'subject' => EmailTemplateDefaults::emailReminder1Subject(),
|
|
'body' => EmailTemplateDefaults::emailReminder1Template(),
|
|
],
|
|
'reminder2' => [
|
|
'subject' => EmailTemplateDefaults::emailReminder2Subject(),
|
|
'body' => EmailTemplateDefaults::emailReminder2Template(),
|
|
],
|
|
'reminder3' => [
|
|
'subject' => EmailTemplateDefaults::emailReminder3Subject(),
|
|
'body' => EmailTemplateDefaults::emailReminder3Template(),
|
|
],
|
|
'reminder_endless' => [
|
|
'subject' => EmailTemplateDefaults::emailReminderEndlessSubject(),
|
|
'body' => EmailTemplateDefaults::emailReminderEndlessTemplate(),
|
|
],
|
|
'statement' => [
|
|
'subject' => EmailTemplateDefaults::emailStatementSubject(),
|
|
'body' => EmailTemplateDefaults::emailStatementTemplate(),
|
|
],
|
|
];
|
|
|
|
});
|
|
}
|
|
|
|
public function boot()
|
|
{
|
|
|
|
}
|
|
} |