connect mail settings to api

This commit is contained in:
yogesh_gohil
2019-11-12 17:21:06 +05:30
parent 4decc56b7c
commit 4839e57791
6 changed files with 74 additions and 20 deletions

View File

@ -57,13 +57,30 @@ class EnvironmentController extends Controller
*/
public function saveMailEnvironment(MailEnvironmentRequest $request)
{
$setting = Setting::getSetting('profile_complete');
$results = $this->EnvironmentManager->saveMailVariables($request);
Setting::setSetting('profile_complete', 4);
if ($setting !== 'COMPLETED')
{
Setting::setSetting('profile_complete', 4);
}
return response()->json($results);
}
public function getMailEnvironment()
{
$MailData = [
'mail_driver' => config('mail.driver'),
'mail_host' => config('mail.host'),
'mail_port' => config('mail.port'),
'mail_username' => config('mail.username'),
'mail_password' => config('mail.password'),
'mail_encryption' => config('mail.encryption')
];
return response()->json($MailData);
}
/**
*