Blame view

database/seeders/PartnersTableSeeder.php 3.51 KB
d2e0d4fcb   Андрей Ларионов   Добавление миграц...
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
  <?php
  
  namespace Database\Seeders;
  
  use App\Models\Partners;
  use Illuminate\Database\Console\Seeds\WithoutModelEvents;
  use Illuminate\Database\Eloquent\Model;
  use Illuminate\Database\Seeder;
  
  class PartnersTableSeeder extends Seeder
  {
      /**
       * Run the database seeds.
       *
       * @return void
       */
      public function run()
      {
          $data = [
              /*1 */[
                  'name' => 'Сбербанк',
                  'foto' => 'images/partners/partners-item-img-3.png'
              ],
              /*2*/[
                  'name' => 'Росбанк2',
                  'foto' => 'images/partners/partners-item-img-3.png'
              ],
              /*3*/[
                  'name' => 'Ренесансбанк3',
                  'foto' => 'images/partners/partners-item-img-3.png'
              ],
              /*4*/[
                  'name' => 'Тиньковбанк4',
                  'foto' => 'images/partners/partners-item-img-3.png'
              ],
              /*5*/[
                  'name' => 'Летобанк5',
                  'foto' => 'images/partners/partners-item-img-3.png'
              ],
              /*6*/[
                  'name' => 'Хоумкредитбанк6',
                  'foto' => 'images/partners/partners-item-img-3.png'
              ],
              /*7*/[
                  'name' => 'Сбербанк7',
                  'foto' => 'images/partners/partners-item-img-3.png'
              ],
              /*8*/[
                  'name' => 'Сбербанк8',
                  'foto' => 'images/partners/partners-item-img-3.png'
              ],
              /*9*/[
                  'name' => 'Сбербанк9',
                  'foto' => 'images/partners/partners-item-img-3.png'
              ],
              /*10*/[
                  'name' => 'Сбербанк10',
                  'foto' => 'images/partners/partners-item-img-3.png'
              ],
              /*11*/[
                  'name' => 'Сбербанк11',
                  'foto' => 'images/partners/partners-item-img-3.png'
              ],
              /*12*/[
                  'name' => 'Сбербанк12',
                  'foto' => 'images/partners/partners-item-img-3.png'
              ],
              /*13*/[
                  'name' => 'Сбербанк13',
                  'foto' => 'images/partners/partners-item-img-3.png'
              ],
              /*14*/[
                  'name' => 'Сбербанк14',
                  'foto' => 'images/partners/partners-item-img-3.png'
              ],
              /*15*/[
                  'name' => 'Сбербанк15',
                  'foto' => 'images/partners/partners-item-img-3.png'
              ],
              /*16*/[
                  'name' => 'Сбербанк16',
                  'foto' => 'images/partners/partners-item-img-3.png'
              ],
              /*17*/[
                  'name' => 'Сбербанк17',
                  'foto' => 'images/partners/partners-item-img-3.png'
              ],
              /*18*/[
                  'name' => 'Сбербанк18',
                  'foto' => 'images/partners/partners-item-img-3.png'
              ],
              /*19*/[
                  'name' => 'Сбербанк19',
                  'foto' => 'images/partners/partners-item-img-3.png'
              ],
              /*20*/[
                  'name' => 'Сбербанк20',
                  'foto' => 'images/partners/partners-item-img-3.png'
              ],
          ];
  
          foreach ($data as $item) {
              $albom = new Partners();
              $albom->name = $item['name'];
              $albom->foto = $item['foto'];
              $albom->save();
          }
      }
  }