Implement ticket links and blocker state
This commit is contained in:
@@ -0,0 +1,30 @@
|
||||
<?php
|
||||
|
||||
namespace Database\Seeders;
|
||||
|
||||
use App\Models\Project;
|
||||
use App\Models\TicketLinkType;
|
||||
use Illuminate\Database\Seeder;
|
||||
|
||||
class TicketLinkTypeSeeder extends Seeder
|
||||
{
|
||||
/**
|
||||
* Run the database seeds.
|
||||
*/
|
||||
public function run(): void
|
||||
{
|
||||
Project::query()
|
||||
->orderBy('id')
|
||||
->get()
|
||||
->each(function (Project $project): void {
|
||||
TicketLinkType::factory()
|
||||
->count(2)
|
||||
->sequence(
|
||||
['label' => 'Relates to', 'position' => 1],
|
||||
['label' => 'Blocks', 'position' => 2],
|
||||
)
|
||||
->for($project)
|
||||
->create();
|
||||
});
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user