Last change
on this file since 7ed1069 was 0924b6c, checked in by Özkan İliyaz <iliyaz_96@…>, 4 years ago |
initial commit
|
-
Property mode
set to
100644
|
File size:
965 bytes
|
Line | |
---|
1 | <?php
|
---|
2 |
|
---|
3 | use Carbon\Carbon;
|
---|
4 | use Illuminate\Database\Seeder;
|
---|
5 |
|
---|
6 | class CategoriesTableSeeder extends Seeder
|
---|
7 | {
|
---|
8 | /**
|
---|
9 | * Run the database seeds.
|
---|
10 | *
|
---|
11 | * @return void
|
---|
12 | */
|
---|
13 | public function run()
|
---|
14 | {
|
---|
15 | DB::table('categories')->insert([
|
---|
16 | [
|
---|
17 | "name" => "Videos",
|
---|
18 | "color" => "#4ed8cf",
|
---|
19 | "created_at" => Carbon::now()->format('Y-m-d H:i:s'),
|
---|
20 | ],
|
---|
21 | [
|
---|
22 | "name" => "Cars",
|
---|
23 | "color" => "#39a0ed",
|
---|
24 | "created_at" => Carbon::now()->format('Y-m-d H:i:s'),
|
---|
25 | ],
|
---|
26 | [
|
---|
27 | "name" => "Mobile",
|
---|
28 | "color" => "#e7a300",
|
---|
29 | "created_at" => Carbon::now()->format('Y-m-d H:i:s'),
|
---|
30 | ],
|
---|
31 | [
|
---|
32 | "name" => "Computers",
|
---|
33 | "color" => "#fb3640",
|
---|
34 | "created_at" => Carbon::now()->format('Y-m-d H:i:s'),
|
---|
35 | ],
|
---|
36 | ]);
|
---|
37 | }
|
---|
38 | }
|
---|
Note:
See
TracBrowser
for help on using the repository browser.