2023-04-03 11:37:53 +00:00
|
|
|
<?php
|
|
|
|
|
|
|
|
namespace Database\Seeders;
|
|
|
|
|
|
|
|
use App\Models\Application;
|
|
|
|
use App\Models\LocalPersistentVolume;
|
|
|
|
use Illuminate\Database\Seeder;
|
|
|
|
|
|
|
|
class LocalPersistentVolumeSeeder extends Seeder
|
|
|
|
{
|
|
|
|
/**
|
|
|
|
* Run the database seeds.
|
|
|
|
*/
|
|
|
|
public function run(): void
|
|
|
|
{
|
2023-04-04 13:25:42 +00:00
|
|
|
$application = Application::where('name', 'Public application (from GitHub)')->first();
|
2023-04-03 11:37:53 +00:00
|
|
|
LocalPersistentVolume::create([
|
|
|
|
'name' => 'test-pv',
|
|
|
|
'mount_path' => '/data',
|
2023-04-04 13:25:42 +00:00
|
|
|
'resource_id' => $application->id,
|
2023-04-03 11:37:53 +00:00
|
|
|
'resource_type' => Application::class,
|
|
|
|
]);
|
|
|
|
}
|
|
|
|
}
|