firstcommit
This commit is contained in:
20
app/Services/ContactUsService.php
Normal file
20
app/Services/ContactUsService.php
Normal file
@@ -0,0 +1,20 @@
|
||||
<?php
|
||||
|
||||
namespace App\Services;
|
||||
|
||||
use Modules\ContactUs\app\Repositories\ContactUsRepository;
|
||||
|
||||
class ContactUsService
|
||||
{
|
||||
protected $contactUsRepository;
|
||||
|
||||
public function __construct(ContactUsRepository $contactUsRepository)
|
||||
{
|
||||
$this->contactUsRepository = $contactUsRepository;
|
||||
}
|
||||
|
||||
public function storeContactUs(array $validated)
|
||||
{
|
||||
return $this->contactUsRepository->storeContactUsList($validated);
|
||||
}
|
||||
}
|
26
app/Services/LogoService.php
Normal file
26
app/Services/LogoService.php
Normal file
@@ -0,0 +1,26 @@
|
||||
<?php
|
||||
|
||||
namespace App\Services;
|
||||
|
||||
use Modules\Setting\app\Models\Setting;
|
||||
|
||||
class LogoService
|
||||
{
|
||||
public function getSiteLogo()
|
||||
{
|
||||
$siteLogo = null;
|
||||
|
||||
$siteLogoData = Setting::where('setting_name', 'general_setting')
|
||||
->whereIn('name', ['primary_image', 'secondary_image'])
|
||||
->get()
|
||||
->keyBy('name');
|
||||
|
||||
if (!empty($siteLogoData['primary_image']->detail)) {
|
||||
$siteLogo = asset('storage/uploads/' . $siteLogoData['primary_image']->detail);
|
||||
} elseif (!empty($siteLogoData['secondary_image']->detail)) {
|
||||
$siteLogo = asset('storage/uploads/' . $siteLogoData['secondary_image']->detail);
|
||||
}
|
||||
|
||||
return $siteLogo;
|
||||
}
|
||||
}
|
20
app/Services/SubscriptionService.php
Normal file
20
app/Services/SubscriptionService.php
Normal file
@@ -0,0 +1,20 @@
|
||||
<?php
|
||||
|
||||
namespace App\Services;
|
||||
|
||||
use Modules\Subscription\app\Repositories\SubscriptionRepository;
|
||||
|
||||
class SubscriptionService
|
||||
{
|
||||
protected $subscriptionRepository;
|
||||
|
||||
public function __construct(SubscriptionRepository $subscriptionRepository)
|
||||
{
|
||||
$this->subscriptionRepository = $subscriptionRepository;
|
||||
}
|
||||
|
||||
public function storeSubscription(array $validated)
|
||||
{
|
||||
return $this->subscriptionRepository->storeSubscription($validated);
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user