mirror of
https://github.com/openclassify/openclassify.git
synced 2026-01-24 22:11:01 -06:00
move folder
This commit is contained in:
parent
b04abde541
commit
809dc35705
@ -1,56 +1,10 @@
|
|||||||
<?php namespace Visiosoft\AdvsModule;
|
<?php namespace Visiosoft\AdvsModule;
|
||||||
|
|
||||||
use Anomaly\FilesModule\Disk\Contract\DiskRepositoryInterface;
|
|
||||||
use Anomaly\FilesModule\Folder\Contract\FolderRepositoryInterface;
|
|
||||||
use Anomaly\Streams\Platform\Database\Seeder\Seeder;
|
use Anomaly\Streams\Platform\Database\Seeder\Seeder;
|
||||||
|
|
||||||
class AdvsModuleSeeder extends Seeder
|
class AdvsModuleSeeder extends Seeder
|
||||||
{
|
{
|
||||||
/**
|
|
||||||
* The disk repository.
|
|
||||||
*
|
|
||||||
* @var DiskRepositoryInterface
|
|
||||||
*/
|
|
||||||
protected $disks;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* The folder repository.
|
|
||||||
*
|
|
||||||
* @var FolderRepositoryInterface
|
|
||||||
*/
|
|
||||||
protected $folders;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Create a new FolderSeeder instance.
|
|
||||||
*
|
|
||||||
* @param DiskRepositoryInterface $disks
|
|
||||||
* @param FolderRepositoryInterface $folders
|
|
||||||
*/
|
|
||||||
public function __construct(DiskRepositoryInterface $disks, FolderRepositoryInterface $folders)
|
|
||||||
{
|
|
||||||
parent::__construct();
|
|
||||||
|
|
||||||
$this->disks = $disks;
|
|
||||||
$this->folders = $folders;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Run the seeder.
|
|
||||||
*/
|
|
||||||
public function run()
|
public function run()
|
||||||
{
|
{
|
||||||
//Create Store Icon Folder
|
|
||||||
if (!$this->folders->findBySlug('ads_excel')) {
|
|
||||||
$disk = $this->disks->findBySlug('local');
|
|
||||||
|
|
||||||
$this->folders->create([
|
|
||||||
'en' => [
|
|
||||||
'name' => 'Ads Excel',
|
|
||||||
'description' => 'A folder for Ads Excel.',
|
|
||||||
],
|
|
||||||
'slug' => 'ads_excel',
|
|
||||||
'disk' => $disk
|
|
||||||
]);
|
|
||||||
};
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1,5 +1,7 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
|
use Anomaly\FilesModule\Disk\Contract\DiskRepositoryInterface;
|
||||||
|
use Anomaly\FilesModule\Folder\Contract\FolderRepositoryInterface;
|
||||||
use Anomaly\NavigationModule\Link\LinkModel;
|
use Anomaly\NavigationModule\Link\LinkModel;
|
||||||
use Anomaly\NavigationModule\Menu\Contract\MenuRepositoryInterface;
|
use Anomaly\NavigationModule\Menu\Contract\MenuRepositoryInterface;
|
||||||
use Anomaly\Streams\Platform\Entry\EntryRepository;
|
use Anomaly\Streams\Platform\Entry\EntryRepository;
|
||||||
@ -21,11 +23,15 @@ class DatabaseSeeder extends Seeder
|
|||||||
protected $users;
|
protected $users;
|
||||||
protected $roles;
|
protected $roles;
|
||||||
protected $activator;
|
protected $activator;
|
||||||
|
protected $disks;
|
||||||
|
protected $folders;
|
||||||
|
|
||||||
public function __construct(
|
public function __construct(
|
||||||
WidgetRepositoryInterface $widgets,
|
WidgetRepositoryInterface $widgets,
|
||||||
MenuRepositoryInterface $menus,
|
MenuRepositoryInterface $menus,
|
||||||
UserRepositoryInterface $users,
|
UserRepositoryInterface $users,
|
||||||
|
DiskRepositoryInterface $disks,
|
||||||
|
FolderRepositoryInterface $folders,
|
||||||
RoleRepositoryInterface $roles,
|
RoleRepositoryInterface $roles,
|
||||||
UserActivator $activator
|
UserActivator $activator
|
||||||
)
|
)
|
||||||
@ -35,6 +41,8 @@ class DatabaseSeeder extends Seeder
|
|||||||
$this->users = $users;
|
$this->users = $users;
|
||||||
$this->roles = $roles;
|
$this->roles = $roles;
|
||||||
$this->activator = $activator;
|
$this->activator = $activator;
|
||||||
|
$this->disks = $disks;
|
||||||
|
$this->folders = $folders;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function run()
|
public function run()
|
||||||
@ -125,5 +133,20 @@ class DatabaseSeeder extends Seeder
|
|||||||
$zip->close();
|
$zip->close();
|
||||||
|
|
||||||
$this->call(widgetSeeder::class);
|
$this->call(widgetSeeder::class);
|
||||||
|
|
||||||
|
|
||||||
|
//Create Store Icon Folder
|
||||||
|
if (!$this->folders->findBySlug('ads_excel')) {
|
||||||
|
$disk = $this->disks->findBySlug('local');
|
||||||
|
|
||||||
|
$this->folders->create([
|
||||||
|
'en' => [
|
||||||
|
'name' => 'Ads Excel',
|
||||||
|
'description' => 'A folder for Ads Excel.',
|
||||||
|
],
|
||||||
|
'slug' => 'ads_excel',
|
||||||
|
'disk' => $disk
|
||||||
|
]);
|
||||||
|
};
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user