@@ -396,6 +396,7 @@ public function run()
396
396
397
397
// Pipelines stages
398
398
$ items = [
399
+ // Leads
399
400
[
400
401
[
401
402
'id ' => 1 ,
@@ -476,17 +477,274 @@ public function run()
476
477
'pipeline_stage_probability_id ' => 12 ,
477
478
],
478
479
],
480
+ // Deals
481
+ [
482
+ [
483
+ 'id ' => 9 ,
484
+ ],
485
+ [
486
+ 'name ' => 'Draft ' ,
487
+ 'pipeline_id ' => 2 ,
488
+ 'pipeline_stage_probability_id ' => 1 ,
489
+ ],
490
+ ],
491
+ [
492
+ [
493
+ 'id ' => 10 ,
494
+ ],
495
+ [
496
+ 'name ' => 'Pending ' ,
497
+ 'pipeline_id ' => 2 ,
498
+ 'pipeline_stage_probability_id ' => 9 ,
499
+ ],
500
+ ],
501
+ [
502
+ [
503
+ 'id ' => 11 ,
504
+ ],
505
+ [
506
+ 'name ' => 'Closed Won ' ,
507
+ 'pipeline_id ' => 2 ,
508
+ 'pipeline_stage_probability_id ' => 11 ,
509
+ ],
510
+ ],
511
+ [
512
+ [
513
+ 'id ' => 12 ,
514
+ ],
515
+ [
516
+ 'name ' => 'Closed Lost ' ,
517
+ 'pipeline_id ' => 2 ,
518
+ 'pipeline_stage_probability_id ' => 12 ,
519
+ ],
520
+ ],
521
+ // Quotes
522
+ [
523
+ [
524
+ 'id ' => 13 ,
525
+ ],
526
+ [
527
+ 'name ' => 'Draft ' ,
528
+ 'pipeline_id ' => 3 ,
529
+ 'pipeline_stage_probability_id ' => 1 ,
530
+ ],
531
+ ],
532
+ [
533
+ [
534
+ 'id ' => 14 ,
535
+ ],
536
+ [
537
+ 'name ' => 'Sent ' ,
538
+ 'pipeline_id ' => 3 ,
539
+ 'pipeline_stage_probability_id ' => 9 ,
540
+ ],
541
+ ],
542
+ [
543
+ [
544
+ 'id ' => 15 ,
545
+ ],
546
+ [
547
+ 'name ' => 'Accepted ' ,
548
+ 'pipeline_id ' => 3 ,
549
+ 'pipeline_stage_probability_id ' => 11 ,
550
+ ],
551
+ ],
552
+ [
553
+ [
554
+ 'id ' => 16 ,
555
+ ],
556
+ [
557
+ 'name ' => 'Rejected ' ,
558
+ 'pipeline_id ' => 3 ,
559
+ 'pipeline_stage_probability_id ' => 12 ,
560
+ ],
561
+ ],
562
+ [
563
+ [
564
+ 'id ' => 17 ,
565
+ ],
566
+ [
567
+ 'name ' => 'Ordered ' ,
568
+ 'pipeline_id ' => 3 ,
569
+ 'pipeline_stage_probability_id ' => 11 ,
570
+ ],
571
+ ],
572
+ // Orders
573
+ [
574
+ [
575
+ 'id ' => 18 ,
576
+ ],
577
+ [
578
+ 'name ' => 'Draft ' ,
579
+ 'pipeline_id ' => 4 ,
580
+ 'pipeline_stage_probability_id ' => 1 ,
581
+ ],
582
+ ],
583
+ [
584
+ [
585
+ 'id ' => 19 ,
586
+ ],
587
+ [
588
+ 'name ' => 'Open ' ,
589
+ 'pipeline_id ' => 4 ,
590
+ 'pipeline_stage_probability_id ' => 9 ,
591
+ ],
592
+ ],
593
+ [
594
+ [
595
+ 'id ' => 20 ,
596
+ ],
597
+ [
598
+ 'name ' => 'Invoiced ' ,
599
+ 'pipeline_id ' => 4 ,
600
+ 'pipeline_stage_probability_id ' => 11 ,
601
+ ],
602
+ ],
603
+ [
604
+ [
605
+ 'id ' => 21 ,
606
+ ],
607
+ [
608
+ 'name ' => 'Delivered ' ,
609
+ 'pipeline_id ' => 4 ,
610
+ 'pipeline_stage_probability_id ' => 11 ,
611
+ ],
612
+ ],
613
+ [
614
+ [
615
+ 'id ' => 22 ,
616
+ ],
617
+ [
618
+ 'name ' => 'Completed ' ,
619
+ 'pipeline_id ' => 4 ,
620
+ 'pipeline_stage_probability_id ' => 11 ,
621
+ ],
622
+ ],
623
+ // Invoices
624
+ [
625
+ [
626
+ 'id ' => 23 ,
627
+ ],
628
+ [
629
+ 'name ' => 'Draft ' ,
630
+ 'pipeline_id ' => 5 ,
631
+ 'pipeline_stage_probability_id ' => 1 ,
632
+ ],
633
+ ],
634
+ [
635
+ [
636
+ 'id ' => 24 ,
637
+ ],
638
+ [
639
+ 'name ' => 'Awaiting Approval ' ,
640
+ 'pipeline_id ' => 5 ,
641
+ 'pipeline_stage_probability_id ' => 5 ,
642
+ ],
643
+ ],
644
+ [
645
+ [
646
+ 'id ' => 25 ,
647
+ ],
648
+ [
649
+ 'name ' => 'Awaiting Payment ' ,
650
+ 'pipeline_id ' => 5 ,
651
+ 'pipeline_stage_probability_id ' => 9 ,
652
+ ],
653
+ ],
654
+ [
655
+ [
656
+ 'id ' => 26 ,
657
+ ],
658
+ [
659
+ 'name ' => 'Paid ' ,
660
+ 'pipeline_id ' => 5 ,
661
+ 'pipeline_stage_probability_id ' => 11 ,
662
+ ],
663
+ ],
664
+ // Deliveries
665
+ [
666
+ [
667
+ 'id ' => 27 ,
668
+ ],
669
+ [
670
+ 'name ' => 'Draft ' ,
671
+ 'pipeline_id ' => 6 ,
672
+ 'pipeline_stage_probability_id ' => 1 ,
673
+ ],
674
+ ],
675
+ [
676
+ [
677
+ 'id ' => 28 ,
678
+ ],
679
+ [
680
+ 'name ' => 'Packed ' ,
681
+ 'pipeline_id ' => 6 ,
682
+ 'pipeline_stage_probability_id ' => 9 ,
683
+ ],
684
+ ],
685
+ [
686
+ [
687
+ 'id ' => 29 ,
688
+ ],
689
+ [
690
+ 'name ' => 'Sent ' ,
691
+ 'pipeline_id ' => 6 ,
692
+ 'pipeline_stage_probability_id ' => 11 ,
693
+ ],
694
+ ],
695
+ [
696
+ [
697
+ 'id ' => 30 ,
698
+ ],
699
+ [
700
+ 'name ' => 'Delivered ' ,
701
+ 'pipeline_id ' => 6 ,
702
+ 'pipeline_stage_probability_id ' => 11 ,
703
+ ],
704
+ ],
705
+ // Purchase Orders
706
+ [
707
+ [
708
+ 'id ' => 31 ,
709
+ ],
710
+ [
711
+ 'name ' => 'Draft ' ,
712
+ 'pipeline_id ' => 7 ,
713
+ 'pipeline_stage_probability_id ' => 1 ,
714
+ ],
715
+ ],
716
+ [
717
+ [
718
+ 'id ' => 32 ,
719
+ ],
720
+ [
721
+ 'name ' => 'Awaiting Approval ' ,
722
+ 'pipeline_id ' => 7 ,
723
+ 'pipeline_stage_probability_id ' => 5 ,
724
+ ],
725
+ ],
726
+ [
727
+ [
728
+ 'id ' => 33 ,
729
+ ],
730
+ [
731
+ 'name ' => 'Approved ' ,
732
+ 'pipeline_id ' => 7 ,
733
+ 'pipeline_stage_probability_id ' => 9 ,
734
+ ],
735
+ ],
736
+ [
737
+ [
738
+ 'id ' => 34 ,
739
+ ],
740
+ [
741
+ 'name ' => 'Paid ' ,
742
+ 'pipeline_id ' => 7 ,
743
+ 'pipeline_stage_probability_id ' => 11 ,
744
+ ],
745
+ ],
479
746
];
480
747
481
-
482
- // Add all the default stages for various pipelines
483
- // Deals
484
- // Quotes
485
- // Orders
486
- // Invoices
487
- // Deliveries
488
- // Purchase Orders
489
-
490
748
foreach ($ items as $ item ) {
491
749
\VentureDrake \LaravelCrm \Models \PipelineStage::firstOrCreate ($ item [0 ], $ item [1 ]);
492
750
}
0 commit comments