|
1
|
|
|
<?php |
|
2
|
|
|
|
|
3
|
|
|
use Illuminate\Database\Seeder; |
|
4
|
|
|
|
|
5
|
|
|
class NotificationsTableSeeder extends Seeder |
|
|
|
|
|
|
6
|
|
|
{ |
|
7
|
|
|
/** |
|
8
|
|
|
* Auto generated seed file. |
|
9
|
|
|
* |
|
10
|
|
|
* @return void |
|
11
|
|
|
*/ |
|
12
|
|
|
public function run() |
|
13
|
|
|
{ |
|
14
|
|
|
\DB::table('notifications')->delete(); |
|
15
|
|
|
|
|
16
|
|
|
\DB::table('notifications')->insert([ |
|
17
|
|
|
0 => [ |
|
18
|
|
|
'id' => 1, |
|
19
|
|
|
'icon' => 'flight_land', |
|
20
|
|
|
'link' => '/purchases/1', |
|
21
|
|
|
'message' => 'Purchase of 10 Acoustic Guitar has arrived from Aria Resellers, China.', |
|
22
|
|
|
'notifiable_type' => 'App\\Purchase', |
|
23
|
|
|
'notifiable_id' => 1, |
|
24
|
|
|
'dismissed' => 1, |
|
25
|
|
|
'created_at' => '2016-04-18 13:05:18', |
|
26
|
|
|
'updated_at' => '2016-04-18 13:07:59', |
|
27
|
|
|
'deleted_at' => null, |
|
28
|
|
|
], |
|
29
|
|
|
1 => [ |
|
30
|
|
|
'id' => 2, |
|
31
|
|
|
'icon' => 'flight_land', |
|
32
|
|
|
'link' => '/purchases/3', |
|
33
|
|
|
'message' => 'Purchase of 10 Acoustic Guitar has arrived from Aria Resellers, China.', |
|
34
|
|
|
'notifiable_type' => 'App\\Purchase', |
|
35
|
|
|
'notifiable_id' => 3, |
|
36
|
|
|
'dismissed' => 1, |
|
37
|
|
|
'created_at' => '2016-04-18 13:06:42', |
|
38
|
|
|
'updated_at' => '2016-04-18 13:07:54', |
|
39
|
|
|
'deleted_at' => null, |
|
40
|
|
|
], |
|
41
|
|
|
2 => [ |
|
42
|
|
|
'id' => 3, |
|
43
|
|
|
'icon' => 'flight_land', |
|
44
|
|
|
'link' => '/purchases/4', |
|
45
|
|
|
'message' => 'Purchase of 50 Electric Guitars has arrived from Aria Resellers, China.', |
|
46
|
|
|
'notifiable_type' => 'App\\Purchase', |
|
47
|
|
|
'notifiable_id' => 4, |
|
48
|
|
|
'dismissed' => 1, |
|
49
|
|
|
'created_at' => '2016-04-18 13:07:11', |
|
50
|
|
|
'updated_at' => '2016-04-18 13:07:51', |
|
51
|
|
|
'deleted_at' => null, |
|
52
|
|
|
], |
|
53
|
|
|
]); |
|
54
|
|
|
} |
|
55
|
|
|
} |
|
56
|
|
|
|
You can fix this by adding a namespace to your class:
When choosing a vendor namespace, try to pick something that is not too generic to avoid conflicts with other libraries.