Skip to content

Commit

Permalink
Added seeders for ReferentieReferentieType; made image on referenties…
Browse files Browse the repository at this point in the history
… nullable
  • Loading branch information
Kamieljv committed Jul 11, 2024
1 parent 3752620 commit 393cad3
Show file tree
Hide file tree
Showing 4 changed files with 101 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ public function up()
$table->string('title');
$table->string('url');
$table->text('description');
$table->string('image');
$table->string('image')->nullable();
$table->enum('status', ['PUBLISHED', 'DRAFT'])->default('DRAFT');
$table->timestamps();
});
Expand Down
1 change: 1 addition & 0 deletions database/seeders/DatabaseSeeder.php
Original file line number Diff line number Diff line change
Expand Up @@ -48,5 +48,6 @@ public function run()
$this->call(ReferentieTypeDimensionTableSeeder::class);
$this->call(ReferentiesTableSeeder::class);
$this->call(ReferentieThemeTableSeeder::class);
$this->call(ReferentieReferentieTypeTableSeeder::class);
}
}
56 changes: 56 additions & 0 deletions database/seeders/ReferentieReferentieTypeTableSeeder.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
<?php

namespace Database\Seeders;

use Illuminate\Database\Seeder;

class ReferentieReferentieTypeTableSeeder extends Seeder
{

/**
* Auto generated seed file
*
* @return void
*/
public function run()
{


\DB::table('referentie_referentie_type')->delete();

\DB::table('referentie_referentie_type')->insert(array (
0 =>
array (
'id' => 4,
'referentie_id' => 5,
'referentie_type_id' => 2,
),
1 =>
array (
'id' => 5,
'referentie_id' => 4,
'referentie_type_id' => 2,
),
2 =>
array (
'id' => 6,
'referentie_id' => 3,
'referentie_type_id' => 2,
),
3 =>
array (
'id' => 7,
'referentie_id' => 1,
'referentie_type_id' => 1,
),
4 =>
array (
'id' => 8,
'referentie_id' => 2,
'referentie_type_id' => 2,
),
));


}
}
53 changes: 43 additions & 10 deletions database/seeders/ReferentiesTableSeeder.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,23 +23,56 @@ public function run()
array (
'id' => 1,
'title' => 'Vrijwilligersfuncties Greenpeace',
'url' => 'url',
'description' => 'lorem ipsum',
'image' => 'image',
'url' => 'http://ns.nl/word-vrijwilliger',
'description' => '<p>lorem ipsum</p>',
'image' => NULL,
'status' => 'PUBLISHED',
'created_at' => '2024-04-05 14:22:17',
'updated_at' => NULL,
'created_at' => '2024-04-05 14:22:00',
'updated_at' => '2024-07-11 16:09:57',
),
1 =>
array (
'id' => 2,
'title' => 'Effectief Doneren',
'url' => 'url',
'description' => 'lorem ipsum',
'image' => 'image',
'url' => 'https://doneren.nl',
'description' => '<p>lorem ipsum</p>',
'image' => NULL,
'status' => 'PUBLISHED',
'created_at' => '2024-04-05 14:22:16',
'updated_at' => NULL,
'created_at' => '2024-04-05 14:22:00',
'updated_at' => '2024-07-11 16:10:08',
),
2 =>
array (
'id' => 3,
'title' => 'Doneren aan iets anders',
'url' => 'https://doneren.nl',
'description' => '<p>Test</p>',
'image' => NULL,
'status' => 'PUBLISHED',
'created_at' => '2024-07-11 16:04:00',
'updated_at' => '2024-07-11 16:09:42',
),
3 =>
array (
'id' => 4,
'title' => 'Nog een keer doneren',
'url' => 'https://doneren.nl',
'description' => '<p>Test 123</p>',
'image' => NULL,
'status' => 'PUBLISHED',
'created_at' => '2024-07-11 16:05:00',
'updated_at' => '2024-07-11 16:09:33',
),
4 =>
array (
'id' => 5,
'title' => 'En nog een keer doneren',
'url' => 'https://doneren.nl',
'description' => '<p>sdfs</p>',
'image' => NULL,
'status' => 'PUBLISHED',
'created_at' => '2024-07-11 16:05:00',
'updated_at' => '2024-07-11 16:09:24',
),
));

Expand Down

0 comments on commit 393cad3

Please sign in to comment.