mirror of
https://github.com/openclassify/openclassify.git
synced 2026-01-11 18:01:10 -06:00
remove create Template
This commit is contained in:
parent
75b07c8abf
commit
f438fad6d9
@ -1,12 +1,15 @@
|
||||
<?php namespace Visiosoft\AdvsModule\Notifications;
|
||||
|
||||
use Anomaly\Streams\Platform\Database\Seeder\Seeder;
|
||||
use Illuminate\Foundation\Bus\DispatchesJobs;
|
||||
use Illuminate\Support\Str;
|
||||
use Visiosoft\NotificationsModule\Template\Command\CreateTemplate;
|
||||
use Visiosoft\NotificationsModule\Template\Contract\TemplateRepositoryInterface;
|
||||
|
||||
|
||||
class AdvsModuleNotificationsTemplateSeeder extends Seeder
|
||||
{
|
||||
use DispatchesJobs;
|
||||
public function run()
|
||||
{
|
||||
if (is_module_installed('visiosoft.module.notifications')) {
|
||||
@ -65,18 +68,9 @@ class AdvsModuleNotificationsTemplateSeeder extends Seeder
|
||||
];
|
||||
|
||||
foreach ($templates as $template) {
|
||||
$this->createTemplate($template);
|
||||
$this->dispatchNow(new CreateTemplate($template));
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
public function createTemplate($params)
|
||||
{
|
||||
$template_repo = app(TemplateRepositoryInterface::class);
|
||||
|
||||
if (!$template_repo->findBySlug($params['slug'])) {
|
||||
$template_repo->create($params);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -1,12 +1,15 @@
|
||||
<?php namespace Visiosoft\ProfileModule\Notifications;
|
||||
|
||||
use Anomaly\Streams\Platform\Database\Seeder\Seeder;
|
||||
use Illuminate\Foundation\Bus\DispatchesJobs;
|
||||
use Illuminate\Support\Str;
|
||||
use Visiosoft\NotificationsModule\Template\Command\CreateTemplate;
|
||||
use Visiosoft\NotificationsModule\Template\Contract\TemplateRepositoryInterface;
|
||||
|
||||
|
||||
class ProfileModuleNotificationsTemplateSeeder extends Seeder
|
||||
{
|
||||
use DispatchesJobs;
|
||||
public function run()
|
||||
{
|
||||
if (is_module_installed('visiosoft.module.notifications')) {
|
||||
@ -148,17 +151,8 @@ class ProfileModuleNotificationsTemplateSeeder extends Seeder
|
||||
];
|
||||
|
||||
foreach ($templates as $template) {
|
||||
$this->createTemplate($template);
|
||||
$this->dispatchNow(new CreateTemplate($template));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public function createTemplate($params)
|
||||
{
|
||||
$template_repo = app(TemplateRepositoryInterface::class);
|
||||
|
||||
if (!$template_repo->findBySlug($params['slug'])) {
|
||||
$template_repo->create($params);
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Reference in New Issue
Block a user