mirror of
https://github.com/InvoiceShelf/InvoiceShelf.git
synced 2026-04-07 05:31:24 +00:00
Pint code
This commit is contained in:
@@ -53,14 +53,13 @@ class MailConfigurationController extends Controller
|
||||
}
|
||||
|
||||
return response()->json([
|
||||
'success' => 'mail_variables_save_successfully'
|
||||
'success' => 'mail_variables_save_successfully',
|
||||
]);
|
||||
}
|
||||
|
||||
/**
|
||||
* Prepare mail settings for database storage
|
||||
*
|
||||
* @param MailEnvironmentRequest $request
|
||||
* @return array
|
||||
*/
|
||||
private function prepareMailSettingsForDatabase(MailEnvironmentRequest $request)
|
||||
|
||||
@@ -64,14 +64,13 @@ class PDFConfigurationController extends Controller
|
||||
Setting::setSettings($pdfSettings);
|
||||
|
||||
return response()->json([
|
||||
'success' => 'pdf_variables_save_successfully'
|
||||
'success' => 'pdf_variables_save_successfully',
|
||||
]);
|
||||
}
|
||||
|
||||
/**
|
||||
* Prepare PDF settings for database storage
|
||||
*
|
||||
* @param PDFConfigurationRequest $request
|
||||
* @return array
|
||||
*/
|
||||
private function preparePDFSettingsForDatabase(PDFConfigurationRequest $request)
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models;
|
||||
;
|
||||
|
||||
use Carbon\Carbon;
|
||||
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||
|
||||
@@ -4,12 +4,11 @@ namespace App\Providers;
|
||||
|
||||
use App\Models\Setting;
|
||||
use App\Space\InstallUtils;
|
||||
use Illuminate\Support\ServiceProvider;
|
||||
use Illuminate\Support\Facades\Config;
|
||||
use Illuminate\Support\ServiceProvider;
|
||||
|
||||
class AppConfigProvider extends ServiceProvider
|
||||
{
|
||||
|
||||
/**
|
||||
* Bootstrap services.
|
||||
*/
|
||||
@@ -55,7 +54,7 @@ class AppConfigProvider extends ServiceProvider
|
||||
'mail_sendmail_path',
|
||||
]);
|
||||
|
||||
if (!empty($mailSettings['mail_driver'])) {
|
||||
if (! empty($mailSettings['mail_driver'])) {
|
||||
$driver = $mailSettings['mail_driver'];
|
||||
|
||||
// Set default mailer
|
||||
@@ -99,10 +98,10 @@ class AppConfigProvider extends ServiceProvider
|
||||
}
|
||||
|
||||
// Set global from address and name
|
||||
if (!empty($mailSettings['from_mail'])) {
|
||||
if (! empty($mailSettings['from_mail'])) {
|
||||
Config::set('mail.from.address', $mailSettings['from_mail']);
|
||||
}
|
||||
if (!empty($mailSettings['from_name'])) {
|
||||
if (! empty($mailSettings['from_name'])) {
|
||||
Config::set('mail.from.name', $mailSettings['from_name']);
|
||||
}
|
||||
}
|
||||
@@ -126,7 +125,7 @@ class AppConfigProvider extends ServiceProvider
|
||||
'gotenberg_margins',
|
||||
]);
|
||||
|
||||
if (!empty($pdfSettings['pdf_driver'])) {
|
||||
if (! empty($pdfSettings['pdf_driver'])) {
|
||||
$driver = $pdfSettings['pdf_driver'];
|
||||
|
||||
// Set PDF driver
|
||||
@@ -135,13 +134,13 @@ class AppConfigProvider extends ServiceProvider
|
||||
// Configure based on driver
|
||||
switch ($driver) {
|
||||
case 'gotenberg':
|
||||
if (!empty($pdfSettings['gotenberg_host'])) {
|
||||
if (! empty($pdfSettings['gotenberg_host'])) {
|
||||
Config::set('pdf.connections.gotenberg.host', $pdfSettings['gotenberg_host']);
|
||||
}
|
||||
if (!empty($pdfSettings['gotenberg_papersize'])) {
|
||||
if (! empty($pdfSettings['gotenberg_papersize'])) {
|
||||
Config::set('pdf.connections.gotenberg.papersize', $pdfSettings['gotenberg_papersize']);
|
||||
}
|
||||
if (!empty($pdfSettings['gotenberg_margins'])) {
|
||||
if (! empty($pdfSettings['gotenberg_margins'])) {
|
||||
Config::set('pdf.connections.gotenberg.margins', $pdfSettings['gotenberg_margins']);
|
||||
}
|
||||
break;
|
||||
|
||||
@@ -3,9 +3,7 @@
|
||||
namespace App\Space;
|
||||
|
||||
use App\Http\Requests\DatabaseEnvironmentRequest;
|
||||
use App\Http\Requests\DiskEnvironmentRequest;
|
||||
use App\Http\Requests\DomainEnvironmentRequest;
|
||||
use App\Http\Requests\MailEnvironmentRequest;
|
||||
use App\Http\Requests\PDFConfigurationRequest;
|
||||
use Exception;
|
||||
use Illuminate\Support\Facades\Artisan;
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Support\Facades\Facade;
|
||||
use Illuminate\Support\ServiceProvider;
|
||||
|
||||
return [
|
||||
|
||||
|
||||
@@ -31,6 +31,6 @@ return [
|
||||
'host' => env('GOTENBERG_HOST', 'http://pdf:3000'),
|
||||
'papersize' => env('GOTENBERG_PAPERSIZE', '210mm 297mm'),
|
||||
],
|
||||
]
|
||||
],
|
||||
|
||||
];
|
||||
|
||||
Reference in New Issue
Block a user