Initial commit

This commit is contained in:
Ronald Huynen
2026-03-23 21:37:59 +01:00
commit 2547717edb
2193 changed files with 972171 additions and 0 deletions

View File

@@ -0,0 +1,30 @@
<?php
declare(strict_types=1);
use PhpCsFixer\Config;
use PhpCsFixer\Finder;
use PhpCsFixer\Runner\Parallel\ParallelConfigFactory;
return (new Config())
->setParallelConfig(ParallelConfigFactory::detect()) // @TODO 4.0 no need to call this manually
->setRiskyAllowed(false)
->setRules([
'@auto' => true
])
// 💡 by default, Fixer looks for `*.php` files excluding `./vendor/` - here, you can groom this config
->setFinder(
(new Finder())
// 💡 root folder to check
->in(__DIR__)
// 💡 additional files, eg bin entry file
// ->append([__DIR__.'/bin-entry-file'])
// 💡 folders to exclude, if any
// ->exclude([/* ... */])
// 💡 path patterns to exclude, if any
// ->notPath([/* ... */])
// 💡 extra configs
// ->ignoreDotFiles(false) // true by default in v3, false in v4 or future mode
// ->ignoreVCS(true) // true by default
)
;

View File

@@ -0,0 +1,31 @@
<?php
namespace Database\Seeders;
use App\Models\Account;
use Illuminate\Database\Seeder;
use Illuminate\Support\Facades\DB;
class AccountSeeder extends Seeder
{
/**
* Run the database seeds.
*
* @return void
*/
public function run()
{
// Seed test Accounts
// DB::table('accounts')->insert([
// ['name' => 'Personal Account', 'limit_min' => 0, 'limit_max' => 200, 'accountable_type' => 'App\Models\User' , 'accountable_id' => 1, 'created_at' => now(), 'updated_at' => now()],
// ['name' => 'Personal Account', 'limit_min' => 0, 'limit_max' => 200, 'accountable_type' => 'App\Models\User', 'accountable_id' => 2, 'created_at' => now(), 'updated_at' => now()],
// ['name' => 'Personal Account', 'limit_min' => 0, 'limit_max' => 200, 'accountable_type' => 'App\Models\User', 'accountable_id' => 201, 'created_at' => now(), 'updated_at' => now()],
// ['name' => 'Organization Account', 'limit_min' => 0, 'limit_max' => 500, 'accountable_type' => 'App\Models\Organization', 'accountable_id' => 4, 'created_at' => now(), 'updated_at' => now()],
// ['name' => 'Organization Account', 'limit_min' => 0, 'limit_max' => 500, 'accountable_type' => 'App\Models\Organization', 'accountable_id' => 3, 'created_at' => now(), 'updated_at' => now()],
// ['name' => 'Local bank Account', 'limit_min' => 0, 'limit_max' => 200, 'accountable_type' => 'App\Models\Organization' , 'accountable_id' => 2, 'created_at' => now(), 'updated_at' => now()],
// ['name' => 'Super bank Account', 'limit_min' => 0, 'limit_max' => 200, 'accountable_type' => 'App\Models\Organization' , 'accountable_id' => 1, 'created_at' => now(), 'updated_at' => now()]
// ]);
}
}

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,96 @@
<?php
namespace Database\Seeders;
use Illuminate\Database\Seeder;
class CountriesTableSeeder extends Seeder
{
/**
* Auto generated seed file
*
* @return void
*/
public function run()
{
\DB::table('countries')->delete();
\DB::table('countries')->insert(array (
0 =>
array (
'id' => 1,
'code' => 'NL',
'flag' => '🇳🇱',
'phonecode' => '31',
),
1 =>
array (
'id' => 2,
'code' => 'BE',
'flag' => '🇧🇪',
'phonecode' => '32',
),
2 =>
array (
'id' => 3,
'code' => 'DE',
'flag' => '🇩🇪',
'phonecode' => '49',
),
3 =>
array (
'id' => 4,
'code' => 'UK',
'flag' => '🇬🇧',
'phonecode' => '44',
),
4 =>
array (
'id' => 5,
'code' => 'FR',
'flag' => '🇫🇷',
'phonecode' => '33',
),
5 =>
array (
'id' => 6,
'code' => 'ES',
'flag' => '🇪🇸',
'phonecode' => '34',
),
6 =>
array (
'id' => 7,
'code' => 'PT',
'flag' => '🇵🇹',
'phonecode' => '351',
),
7 =>
array (
'id' => 8,
'code' => 'IT',
'flag' => '🇮🇹',
'phonecode' => '39',
),
8 =>
array (
'id' => 9,
'code' => 'PL',
'flag' => '🇵🇱',
'phonecode' => '48',
),
9 =>
array (
'id' => 10,
'code' => 'XX',
'flag' => '🌐',
'phonecode' => '',
),
));
}
}

View File

@@ -0,0 +1,74 @@
<?php
namespace Database\Seeders;
use Illuminate\Database\Seeder;
class CountryLanguagesTableSeeder extends Seeder
{
/**
* Auto generated seed file
*
* @return void
*/
public function run()
{
\DB::table('country_languages')->delete();
\DB::table('country_languages')->insert(array (
0 =>
array (
'id' => 1,
'country_id' => 1,
'code' => 'nl',
),
1 =>
array (
'id' => 4,
'country_id' => 2,
'code' => 'de',
),
2 =>
array (
'id' => 3,
'country_id' => 2,
'code' => 'fr',
),
3 =>
array (
'id' => 2,
'country_id' => 2,
'code' => 'nl',
),
4 =>
array (
'id' => 5,
'country_id' => 3,
'code' => 'de',
),
5 =>
array (
'id' => 6,
'country_id' => 4,
'code' => 'en',
),
6 =>
array (
'id' => 7,
'country_id' => 5,
'code' => 'fr',
),
7 =>
array (
'id' => 8,
'country_id' => 6,
'code' => 'es',
),
));
}
}

View File

@@ -0,0 +1,354 @@
<?php
namespace Database\Seeders;
use Illuminate\Database\Seeder;
class CountryLocalesTableSeeder extends Seeder
{
/**
* Auto generated seed file
*
* @return void
*/
public function run()
{
\DB::table('country_locales')->delete();
\DB::table('country_locales')->insert(array (
0 =>
array (
'id' => 1,
'country_id' => 1,
'name' => 'Nederland',
'alias' => NULL,
'locale' => 'nl',
),
1 =>
array (
'id' => 2,
'country_id' => 1,
'name' => 'Pays Bas',
'alias' => NULL,
'locale' => 'fr',
),
2 =>
array (
'id' => 3,
'country_id' => 1,
'name' => 'Netherlands',
'alias' => NULL,
'locale' => 'en',
),
3 =>
array (
'id' => 4,
'country_id' => 1,
'name' => 'Países Bajos',
'alias' => NULL,
'locale' => 'es',
),
4 =>
array (
'id' => 5,
'country_id' => 2,
'name' => 'België',
'alias' => NULL,
'locale' => 'nl',
),
5 =>
array (
'id' => 6,
'country_id' => 2,
'name' => 'Belgique',
'alias' => NULL,
'locale' => 'fr',
),
6 =>
array (
'id' => 7,
'country_id' => 2,
'name' => 'Belgium',
'alias' => NULL,
'locale' => 'en',
),
7 =>
array (
'id' => 8,
'country_id' => 2,
'name' => 'Belgien',
'alias' => NULL,
'locale' => 'es',
),
8 =>
array (
'id' => 9,
'country_id' => 3,
'name' => 'Duitsland',
'alias' => NULL,
'locale' => 'nl',
),
9 =>
array (
'id' => 10,
'country_id' => 3,
'name' => 'Allemand',
'alias' => NULL,
'locale' => 'fr',
),
10 =>
array (
'id' => 11,
'country_id' => 3,
'name' => 'Germany',
'alias' => NULL,
'locale' => 'en',
),
11 =>
array (
'id' => 12,
'country_id' => 3,
'name' => 'Alemania',
'alias' => NULL,
'locale' => 'es',
),
12 =>
array (
'id' => 13,
'country_id' => 4,
'name' => 'Verenigd Koninkrijk',
'alias' => 'Groot-Brittanië',
'locale' => 'nl',
),
13 =>
array (
'id' => 14,
'country_id' => 4,
'name' => 'Royaume-Uni',
'alias' => NULL,
'locale' => 'fr',
),
14 =>
array (
'id' => 15,
'country_id' => 4,
'name' => 'United Kingdom',
'alias' => NULL,
'locale' => 'en',
),
15 =>
array (
'id' => 16,
'country_id' => 4,
'name' => 'Reino Unido',
'alias' => NULL,
'locale' => 'es',
),
16 =>
array (
'id' => 17,
'country_id' => 5,
'name' => 'Frankrijk',
'alias' => NULL,
'locale' => 'nl',
),
17 =>
array (
'id' => 18,
'country_id' => 5,
'name' => 'France',
'alias' => NULL,
'locale' => 'fr',
),
18 =>
array (
'id' => 19,
'country_id' => 5,
'name' => 'France',
'alias' => NULL,
'locale' => 'en',
),
19 =>
array (
'id' => 20,
'country_id' => 5,
'name' => 'Francia',
'alias' => NULL,
'locale' => 'es',
),
20 =>
array (
'id' => 21,
'country_id' => 6,
'name' => 'Spanje',
'alias' => NULL,
'locale' => 'nl',
),
21 =>
array (
'id' => 22,
'country_id' => 6,
'name' => 'Espagne',
'alias' => NULL,
'locale' => 'fr',
),
22 =>
array (
'id' => 23,
'country_id' => 6,
'name' => 'Spain',
'alias' => NULL,
'locale' => 'en',
),
23 =>
array (
'id' => 24,
'country_id' => 6,
'name' => 'España',
'alias' => NULL,
'locale' => 'es',
),
24 =>
array (
'id' => 25,
'country_id' => 7,
'name' => 'Portugal',
'alias' => NULL,
'locale' => 'nl',
),
25 =>
array (
'id' => 26,
'country_id' => 7,
'name' => 'Portugal',
'alias' => NULL,
'locale' => 'fr',
),
26 =>
array (
'id' => 27,
'country_id' => 7,
'name' => 'Portugal',
'alias' => NULL,
'locale' => 'en',
),
27 =>
array (
'id' => 28,
'country_id' => 7,
'name' => 'Portugal',
'alias' => NULL,
'locale' => 'es',
),
28 =>
array (
'id' => 29,
'country_id' => 8,
'name' => 'Italië',
'alias' => NULL,
'locale' => 'nl',
),
29 =>
array (
'id' => 30,
'country_id' => 8,
'name' => 'Italie',
'alias' => NULL,
'locale' => 'fr',
),
30 =>
array (
'id' => 31,
'country_id' => 8,
'name' => 'Italy',
'alias' => NULL,
'locale' => 'en',
),
31 =>
array (
'id' => 32,
'country_id' => 8,
'name' => 'Italia',
'alias' => NULL,
'locale' => 'es',
),
32 =>
array (
'id' => 33,
'country_id' => 9,
'name' => 'Polen',
'alias' => NULL,
'locale' => 'nl',
),
33 =>
array (
'id' => 34,
'country_id' => 9,
'name' => 'Pologne',
'alias' => NULL,
'locale' => 'fr',
),
34 =>
array (
'id' => 35,
'country_id' => 9,
'name' => 'Poland',
'alias' => NULL,
'locale' => 'en',
),
35 =>
array (
'id' => 36,
'country_id' => 9,
'name' => 'Polonia',
'alias' => NULL,
'locale' => 'es',
),
36 =>
array (
'id' => 37,
'country_id' => 10,
'name' => '~ Location not specified',
'alias' => NULL,
'locale' => 'en',
),
37 =>
array (
'id' => 38,
'country_id' => 10,
'name' => '~ Locatie niet opgegeven',
'alias' => NULL,
'locale' => 'nl',
),
38 =>
array (
'id' => 39,
'country_id' => 10,
'name' => '~ Emplacement non précisé',
'alias' => NULL,
'locale' => 'fr',
),
39 =>
array (
'id' => 40,
'country_id' => 10,
'name' => '~ Ubicación no especificada',
'alias' => NULL,
'locale' => 'es',
),
40 =>
array (
'id' => 41,
'country_id' => 10,
'name' => '~ Standort nicht angegeben',
'alias' => NULL,
'locale' => 'de',
),
));
}
}

View File

@@ -0,0 +1,168 @@
<?php
namespace Database\Seeders;
use App\Http\Controllers\SearchIndexController;
use App\Models\Admin;
use App\Models\Bank;
use App\Models\Locations\Location;
use App\Models\User;
use Database\Seeders\TaggableLocaleContextTableSeeder;
use Database\Seeders\TaggableLocalesTableSeeder;
use Database\Seeders\TaggableTagsTableSeeder;
use Illuminate\Database\Seeder;
use Illuminate\Support\Carbon;
use Illuminate\Support\Facades\Artisan;
use Illuminate\Support\Facades\Hash;
use Illuminate\Support\Facades\Storage;
use Spatie\Permission\Models\Role;
class DatabaseSeeder extends Seeder
{
/**
* Seed the application's database.
*
* @return void
*/
public function run()
{
if ($this->command->confirm('Do you want to seed the base data (transaction types, permissions, countries, etc.)?')) {
$this->call(TransactionTypesTableSeeder::class);
$this->call(PermissionRoleSeeder::class);
$this->call(CountriesTableSeeder::class);
$this->call(CountryLocalesTableSeeder::class);
$this->call(DivisionsTableSeeder::class);
$this->call(DivisionLocalesTableSeeder::class);
$this->call(CitiesTableSeeder::class);
$this->call(CityLocalesTableSeeder::class);
$this->call(DistrictsTableSeeder::class);
$this->call(DistrictLocalesTableSeeder::class);
$this->call(LanguagesTableSeeder::class);
$this->call(LanguageCompetencesTableSeeder::class);
$this->call(SocialsTableSeeder::class);
$this->call(CountryLanguagesTableSeeder::class);
$this->call(PostsTableSeeder::class);
$this->call(PostTranslationsTableSeeder::class);
$this->call(CategoriesTableSeeder::class);
$this->call(ExtendCategoriesSeeder::class);
$this->call(CategoryTranslationsTableSeeder::class);
$this->call(ExtendCategoryTranslationsSeeder::class);
$this->call(PlaceholderPostsSeeder::class);
$this->call(MeetingsTableSeeder::class);
$this->call(MediaTableSeeder::class);
$this->call(LoveReactionTypesTableSeeder::class);
// Seed Super-User with user id 1
$superUser = User::create([
'name' => 'Super-User',
'full_name' => 'Super User',
'email' => 'super-user@example.org',
'email_verified_at' => Carbon::now(),
'password' => Hash::make(timebank_config('init_passwords.super-user')),
'profile_photo_path' => timebank_config('profiles.user.profile_photo_path_default'),
'created_at' => now(),
'updated_at' => now(),
]);
$superAdmin = new Admin();
$superAdmin->forceFill([
'name' => 'Super-Admin',
'full_name' => 'Super Admin',
'email' => 'super-admin@example.org',
'email_verified_at' => Carbon::now(),
'password' => Hash::make(timebank_config('init_passwords.super-admin')),
'profile_photo_path' => timebank_config('profiles.admin.profile_photo_path_default'),
])->save();
$devAdmin = new Admin();
$devAdmin->forceFill([
'name' => 'Dev-Admin',
'full_name' => 'Development Admin',
'email' => 'dev-admin@example.org',
'email_verified_at' => Carbon::now(),
'password' => Hash::make(timebank_config('init_passwords.admin')),
'profile_photo_path' => timebank_config('profiles.admin.profile_photo_path_default'),
])->save();
$location = new Location(['city_id' => 305, 'division_id' => 12, 'country_id' => 1]);
$superUser->locations()->save($location);
$superAdmin->locations()->save($location);
$devAdmin->locations()->save($location);
// Seed Central Bank with bank id 1
$bank = Bank::create([
'name' => timebank_config('central_bank.name'),
'full_name' => timebank_config('central_bank.full_name'),
'email' => timebank_config('central_bank.email'),
'email_verified_at' => Carbon::now(),
'password' => bcrypt(timebank_config('init_passwords.bank')),
'profile_photo_path' => timebank_config('profiles.bank.profile_photo_path_default'),
'level' => 0,
]);
// Create debit account for Central Bank
$debitAccount = new \App\Models\Account();
$debitAccount->name = __(timebank_config('accounts.debit.name', 'debit'));
$debitAccount->limit_min = null;
$debitAccount->limit_max = 0;
$bank->accounts()->save($debitAccount);
// attach admin and bank profile to super-user
$superAdmin->users()->attach($superUser->id);
$superUser->assignRole('super-admin');
$devAdmin->users()->attach($superUser->id);
$superUser->assignRole('admin');
$roleBankManager = Role::findOrCreate('Bank\\' . $bank->id . '\\bank-manager', 'web');
$bank->managers()->attach($superUser->id);
$superUser->assignRole('Bank\\'.$bank->id.'\\bank-manager');
}
if ($this->command->confirm('Do you want to seed the example tags?')) {
$this->call(TaggableTagsTableSeeder::class);
$this->call(TaggableLocalesTableSeeder::class);
$this->call(TaggableContextsTableSeeder::class);
$this->call(TaggableLocaleContextTableSeeder::class);
}
// Migrate Cyclos database
// If CYCLOS_DB env var is set (passed from seed.sh), skip the prompt and use it directly.
$cyclosDb = env('CYCLOS_DB');
$migrateCyclos = $cyclosDb
? true
: $this->command->confirm('Do you want to migrate the cyclos database?');
if ($migrateCyclos) {
$cyclosArgs = $cyclosDb ? ['source_db' => $cyclosDb] : [];
Artisan::call('migrate:cyclos', $cyclosArgs, $this->command->getOutput());
if ($this->command->confirm('Do you want to migrate the cyclos profile data?')) {
Artisan::call('migrate:cyclos-profiles', $cyclosArgs, $this->command->getOutput());
Artisan::call('profiles:clean-about', [], $this->command->getOutput());
Artisan::call('profiles:clean-cyclos-skills', [], $this->command->getOutput());
}
if ($this->command->confirm('Do you want to migrate the cyclos gift accounts?')) {
Artisan::call('migrate:cyclos-gift-accounts', [], $this->command->getOutput());
}
if ($this->command->confirm('Do you want to assign the Dev-Admin role to an existing user that was imported?')) { // Clarified prompt
$username = $this->command->ask('Enter the username of this user'); // Changed from $this->ask to $this->command->ask for consistency
try {
$user = User::where('name', $username)->firstOrFail();
$devAdmin->users()->attach($user->id);
$user->assignRole('admin');
$this->command->info("Dev-Admin role assigned to user {$user->name}.");
} catch (\Illuminate\Database\Eloquent\ModelNotFoundException $e) {
$this->command->error("User with username '{$username}' not found.");
}
}
}
if ($this->command->confirm('Do you want to (re-) create the Elasticsearch index? (This removes all existing data stored in the current index!)')) {
$elasticsearchService = new SearchIndexController();
}
$this->command->info('Super-User email and password: super-user@example.org, ' .timebank_config('init_passwords.super-user'));
}
}

View File

@@ -0,0 +1,154 @@
<?php
namespace Database\Seeders;
use Illuminate\Database\Seeder;
class DistrictLocalesTableSeeder extends Seeder
{
/**
* Auto generated seed file
*
* @return void
*/
public function run()
{
\DB::table('district_locales')->delete();
\DB::table('district_locales')->insert(array (
0 =>
array (
'id' => 1,
'district_id' => 1,
'name' => 'Centrum',
'alias' => NULL,
'locale' => 'nl',
),
1 =>
array (
'id' => 2,
'district_id' => 2,
'name' => 'Laak',
'alias' => NULL,
'locale' => 'nl',
),
2 =>
array (
'id' => 3,
'district_id' => 3,
'name' => 'Leidschenveen-Ypenburg ',
'alias' => NULL,
'locale' => 'nl',
),
3 =>
array (
'id' => 4,
'district_id' => 4,
'name' => 'Escamp',
'alias' => NULL,
'locale' => 'nl',
),
4 =>
array (
'id' => 5,
'district_id' => 5,
'name' => 'Loosduinen',
'alias' => NULL,
'locale' => 'nl',
),
5 =>
array (
'id' => 6,
'district_id' => 6,
'name' => 'Segbroek',
'alias' => NULL,
'locale' => 'nl',
),
6 =>
array (
'id' => 7,
'district_id' => 7,
'name' => 'Scheveningen',
'alias' => NULL,
'locale' => 'nl',
),
7 =>
array (
'id' => 8,
'district_id' => 8,
'name' => 'Haagse Hout',
'alias' => NULL,
'locale' => 'nl',
),
8 =>
array (
'id' => 9,
'district_id' => 1,
'name' => 'Centre',
'alias' => NULL,
'locale' => 'en',
),
9 =>
array (
'id' => 10,
'district_id' => 2,
'name' => 'Laak',
'alias' => NULL,
'locale' => 'en',
),
10 =>
array (
'id' => 11,
'district_id' => 3,
'name' => 'Leidschenveen-Ypenburg ',
'alias' => NULL,
'locale' => 'en',
),
11 =>
array (
'id' => 12,
'district_id' => 4,
'name' => 'Escamp',
'alias' => NULL,
'locale' => 'en',
),
12 =>
array (
'id' => 13,
'district_id' => 5,
'name' => 'Loosduinen',
'alias' => NULL,
'locale' => 'en',
),
13 =>
array (
'id' => 14,
'district_id' => 6,
'name' => 'Segbroek',
'alias' => NULL,
'locale' => 'en',
),
14 =>
array (
'id' => 15,
'district_id' => 7,
'name' => 'Scheveningen',
'alias' => NULL,
'locale' => 'en',
),
15 =>
array (
'id' => 16,
'district_id' => 8,
'name' => 'Haagse Hout',
'alias' => NULL,
'locale' => 'en',
),
));
}
}

View File

@@ -0,0 +1,66 @@
<?php
namespace Database\Seeders;
use Illuminate\Database\Seeder;
class DistrictsTableSeeder extends Seeder
{
/**
* Auto generated seed file
*
* @return void
*/
public function run()
{
\DB::table('districts')->delete();
\DB::table('districts')->insert(array (
0 =>
array (
'id' => 1,
'city_id' => 305,
),
1 =>
array (
'id' => 2,
'city_id' => 305,
),
2 =>
array (
'id' => 3,
'city_id' => 305,
),
3 =>
array (
'id' => 4,
'city_id' => 305,
),
4 =>
array (
'id' => 5,
'city_id' => 305,
),
5 =>
array (
'id' => 6,
'city_id' => 305,
),
6 =>
array (
'id' => 7,
'city_id' => 305,
),
7 =>
array (
'id' => 8,
'city_id' => 305,
),
));
}
}

View File

@@ -0,0 +1,666 @@
<?php
namespace Database\Seeders;
use Illuminate\Database\Seeder;
class DivisionLocalesTableSeeder extends Seeder
{
/**
* Auto generated seed file
*
* @return void
*/
public function run()
{
\DB::table('division_locales')->delete();
\DB::table('division_locales')->insert(array (
0 =>
array (
'id' => 1,
'division_id' => 1,
'name' => 'Drenthe',
'alias' => NULL,
'locale' => 'nl',
),
1 =>
array (
'id' => 2,
'division_id' => 2,
'name' => 'Flevoland',
'alias' => NULL,
'locale' => 'nl',
),
2 =>
array (
'id' => 3,
'division_id' => 3,
'name' => 'Friesland',
'alias' => NULL,
'locale' => 'nl',
),
3 =>
array (
'id' => 4,
'division_id' => 4,
'name' => 'Gelderland',
'alias' => NULL,
'locale' => 'nl',
),
4 =>
array (
'id' => 5,
'division_id' => 5,
'name' => 'Groningen',
'alias' => NULL,
'locale' => 'nl',
),
5 =>
array (
'id' => 6,
'division_id' => 6,
'name' => 'Limburg',
'alias' => NULL,
'locale' => 'nl',
),
6 =>
array (
'id' => 7,
'division_id' => 7,
'name' => 'Noord-Brabant',
'alias' => NULL,
'locale' => 'nl',
),
7 =>
array (
'id' => 8,
'division_id' => 8,
'name' => 'Noord-Holland',
'alias' => NULL,
'locale' => 'nl',
),
8 =>
array (
'id' => 9,
'division_id' => 9,
'name' => 'Overijssel',
'alias' => NULL,
'locale' => 'nl',
),
9 =>
array (
'id' => 10,
'division_id' => 10,
'name' => 'Utrecht',
'alias' => NULL,
'locale' => 'nl',
),
10 =>
array (
'id' => 11,
'division_id' => 11,
'name' => 'Zeeland',
'alias' => NULL,
'locale' => 'nl',
),
11 =>
array (
'id' => 12,
'division_id' => 12,
'name' => 'Zuid-Holland',
'alias' => NULL,
'locale' => 'nl',
),
12 =>
array (
'id' => 13,
'division_id' => 13,
'name' => 'Antwerpen',
'alias' => NULL,
'locale' => 'nl',
),
13 =>
array (
'id' => 14,
'division_id' => 14,
'name' => 'Brussel',
'alias' => NULL,
'locale' => 'nl',
),
14 =>
array (
'id' => 15,
'division_id' => 17,
'name' => 'Henegouwen',
'alias' => NULL,
'locale' => 'nl',
),
15 =>
array (
'id' => 16,
'division_id' => 19,
'name' => 'Limburg',
'alias' => NULL,
'locale' => 'nl',
),
16 =>
array (
'id' => 17,
'division_id' => 18,
'name' => 'Luik',
'alias' => NULL,
'locale' => 'nl',
),
17 =>
array (
'id' => 18,
'division_id' => 20,
'name' => 'Luxenburg',
'alias' => NULL,
'locale' => 'nl',
),
18 =>
array (
'id' => 19,
'division_id' => 21,
'name' => 'Namen',
'alias' => NULL,
'locale' => 'nl',
),
19 =>
array (
'id' => 20,
'division_id' => 15,
'name' => 'Oost-Vlaanderen',
'alias' => NULL,
'locale' => 'nl',
),
20 =>
array (
'id' => 21,
'division_id' => 16,
'name' => 'Vlaams-Brabant',
'alias' => NULL,
'locale' => 'nl',
),
21 =>
array (
'id' => 22,
'division_id' => 22,
'name' => 'Waals-Brabant',
'alias' => NULL,
'locale' => 'nl',
),
22 =>
array (
'id' => 23,
'division_id' => 23,
'name' => 'West-Vlaanderen',
'alias' => NULL,
'locale' => 'nl',
),
23 =>
array (
'id' => 24,
'division_id' => 1,
'name' => 'Drenthe',
'alias' => NULL,
'locale' => 'en',
),
24 =>
array (
'id' => 25,
'division_id' => 2,
'name' => 'Flevoland',
'alias' => NULL,
'locale' => 'en',
),
25 =>
array (
'id' => 26,
'division_id' => 3,
'name' => 'Friesland',
'alias' => NULL,
'locale' => 'en',
),
26 =>
array (
'id' => 27,
'division_id' => 4,
'name' => 'Gelderland',
'alias' => NULL,
'locale' => 'en',
),
27 =>
array (
'id' => 28,
'division_id' => 5,
'name' => 'Groningen',
'alias' => NULL,
'locale' => 'en',
),
28 =>
array (
'id' => 29,
'division_id' => 6,
'name' => 'Limburg',
'alias' => NULL,
'locale' => 'en',
),
29 =>
array (
'id' => 30,
'division_id' => 7,
'name' => 'North Brabant',
'alias' => NULL,
'locale' => 'en',
),
30 =>
array (
'id' => 31,
'division_id' => 8,
'name' => 'North Holland',
'alias' => NULL,
'locale' => 'en',
),
31 =>
array (
'id' => 32,
'division_id' => 9,
'name' => 'Overijssel',
'alias' => NULL,
'locale' => 'en',
),
32 =>
array (
'id' => 33,
'division_id' => 10,
'name' => 'Utrecht',
'alias' => NULL,
'locale' => 'en',
),
33 =>
array (
'id' => 34,
'division_id' => 11,
'name' => 'Zeeland',
'alias' => NULL,
'locale' => 'en',
),
34 =>
array (
'id' => 35,
'division_id' => 12,
'name' => 'South Holland',
'alias' => NULL,
'locale' => 'en',
),
35 =>
array (
'id' => 36,
'division_id' => 13,
'name' => 'Antwerp',
'alias' => NULL,
'locale' => 'en',
),
36 =>
array (
'id' => 37,
'division_id' => 14,
'name' => 'Brussels',
'alias' => NULL,
'locale' => 'en',
),
37 =>
array (
'id' => 38,
'division_id' => 17,
'name' => 'Hainaut',
'alias' => NULL,
'locale' => 'en',
),
38 =>
array (
'id' => 39,
'division_id' => 19,
'name' => 'Limburg',
'alias' => NULL,
'locale' => 'en',
),
39 =>
array (
'id' => 40,
'division_id' => 18,
'name' => 'Liège',
'alias' => NULL,
'locale' => 'en',
),
40 =>
array (
'id' => 41,
'division_id' => 20,
'name' => 'Luxenbourg',
'alias' => NULL,
'locale' => 'en',
),
41 =>
array (
'id' => 42,
'division_id' => 21,
'name' => 'Namur',
'alias' => NULL,
'locale' => 'en',
),
42 =>
array (
'id' => 43,
'division_id' => 15,
'name' => 'East Flanders',
'alias' => NULL,
'locale' => 'en',
),
43 =>
array (
'id' => 44,
'division_id' => 16,
'name' => 'Flemish Brabant',
'alias' => NULL,
'locale' => 'en',
),
44 =>
array (
'id' => 45,
'division_id' => 22,
'name' => 'Walloon Brabant',
'alias' => NULL,
'locale' => 'en',
),
45 =>
array (
'id' => 46,
'division_id' => 23,
'name' => 'West Flanders',
'alias' => NULL,
'locale' => 'en',
),
46 =>
array (
'id' => 47,
'division_id' => 1,
'name' => 'Drenthe',
'alias' => NULL,
'locale' => 'fr',
),
47 =>
array (
'id' => 48,
'division_id' => 2,
'name' => 'Flevoland',
'alias' => NULL,
'locale' => 'fr',
),
48 =>
array (
'id' => 49,
'division_id' => 3,
'name' => 'Frise',
'alias' => NULL,
'locale' => 'fr',
),
49 =>
array (
'id' => 50,
'division_id' => 4,
'name' => 'Gueldre',
'alias' => NULL,
'locale' => 'fr',
),
50 =>
array (
'id' => 51,
'division_id' => 5,
'name' => 'Groningue',
'alias' => NULL,
'locale' => 'fr',
),
51 =>
array (
'id' => 52,
'division_id' => 6,
'name' => 'Limbourg',
'alias' => NULL,
'locale' => 'fr',
),
52 =>
array (
'id' => 53,
'division_id' => 7,
'name' => 'Brabant-Septentrional',
'alias' => NULL,
'locale' => 'fr',
),
53 =>
array (
'id' => 54,
'division_id' => 8,
'name' => 'Hollande-Septentrionale',
'alias' => NULL,
'locale' => 'fr',
),
54 =>
array (
'id' => 55,
'division_id' => 9,
'name' => 'Overijssel',
'alias' => NULL,
'locale' => 'fr',
),
55 =>
array (
'id' => 56,
'division_id' => 10,
'name' => 'Utrecht',
'alias' => NULL,
'locale' => 'fr',
),
56 =>
array (
'id' => 57,
'division_id' => 11,
'name' => 'Zélande',
'alias' => NULL,
'locale' => 'fr',
),
57 =>
array (
'id' => 58,
'division_id' => 12,
'name' => 'Hollande-Méridionale',
'alias' => NULL,
'locale' => 'fr',
),
58 =>
array (
'id' => 59,
'division_id' => 13,
'name' => 'Anvers',
'alias' => NULL,
'locale' => 'fr',
),
59 =>
array (
'id' => 60,
'division_id' => 23,
'name' => 'Flandre-Occidentale',
'alias' => NULL,
'locale' => 'fr',
),
60 =>
array (
'id' => 61,
'division_id' => 15,
'name' => 'Flandre-Orientale',
'alias' => NULL,
'locale' => 'fr',
),
61 =>
array (
'id' => 62,
'division_id' => 17,
'name' => 'Hainaut',
'alias' => NULL,
'locale' => 'fr',
),
62 =>
array (
'id' => 63,
'division_id' => 18,
'name' => 'Liège',
'alias' => NULL,
'locale' => 'fr',
),
63 =>
array (
'id' => 64,
'division_id' => 19,
'name' => 'Limbourg',
'alias' => NULL,
'locale' => 'fr',
),
64 =>
array (
'id' => 65,
'division_id' => 20,
'name' => 'Luxenbourg',
'alias' => NULL,
'locale' => 'fr',
),
65 =>
array (
'id' => 66,
'division_id' => 21,
'name' => 'Namur',
'alias' => NULL,
'locale' => 'fr',
),
66 =>
array (
'id' => 67,
'division_id' => 16,
'name' => 'Brabant flamand',
'alias' => NULL,
'locale' => 'fr',
),
67 =>
array (
'id' => 68,
'division_id' => 22,
'name' => 'Brabant wallon',
'alias' => NULL,
'locale' => 'fr',
),
68 =>
array (
'id' => 69,
'division_id' => 14,
'name' => 'Bruxelles',
'alias' => NULL,
'locale' => 'fr',
),
69 =>
array (
'id' => 70,
'division_id' => 13,
'name' => 'Antwerpen',
'alias' => NULL,
'locale' => 'de',
),
70 =>
array (
'id' => 71,
'division_id' => 14,
'name' => 'Brüssel',
'alias' => NULL,
'locale' => 'de',
),
71 =>
array (
'id' => 72,
'division_id' => 15,
'name' => 'Ostflandern',
'alias' => NULL,
'locale' => 'de',
),
72 =>
array (
'id' => 73,
'division_id' => 16,
'name' => 'Flämisch-Brabant',
'alias' => NULL,
'locale' => 'de',
),
73 =>
array (
'id' => 74,
'division_id' => 17,
'name' => 'Hennegau',
'alias' => NULL,
'locale' => 'de',
),
74 =>
array (
'id' => 75,
'division_id' => 18,
'name' => 'Lüttich',
'alias' => NULL,
'locale' => 'de',
),
75 =>
array (
'id' => 76,
'division_id' => 19,
'name' => 'Limburg',
'alias' => NULL,
'locale' => 'de',
),
76 =>
array (
'id' => 77,
'division_id' => 20,
'name' => 'Luxemburg',
'alias' => NULL,
'locale' => 'de',
),
77 =>
array (
'id' => 78,
'division_id' => 21,
'name' => 'Namur',
'alias' => NULL,
'locale' => 'de',
),
78 =>
array (
'id' => 79,
'division_id' => 22,
'name' => 'Wallonisch-Brabant',
'alias' => NULL,
'locale' => 'de',
),
79 =>
array (
'id' => 80,
'division_id' => 23,
'name' => 'Westflandern',
'alias' => NULL,
'locale' => 'de',
),
));
}
}

View File

@@ -0,0 +1,141 @@
<?php
namespace Database\Seeders;
use Illuminate\Database\Seeder;
class DivisionsTableSeeder extends Seeder
{
/**
* Auto generated seed file
*
* @return void
*/
public function run()
{
\DB::table('divisions')->delete();
\DB::table('divisions')->insert(array (
0 =>
array (
'id' => 1,
'country_id' => 1,
),
1 =>
array (
'id' => 2,
'country_id' => 1,
),
2 =>
array (
'id' => 3,
'country_id' => 1,
),
3 =>
array (
'id' => 4,
'country_id' => 1,
),
4 =>
array (
'id' => 5,
'country_id' => 1,
),
5 =>
array (
'id' => 6,
'country_id' => 1,
),
6 =>
array (
'id' => 7,
'country_id' => 1,
),
7 =>
array (
'id' => 8,
'country_id' => 1,
),
8 =>
array (
'id' => 9,
'country_id' => 1,
),
9 =>
array (
'id' => 10,
'country_id' => 1,
),
10 =>
array (
'id' => 11,
'country_id' => 1,
),
11 =>
array (
'id' => 12,
'country_id' => 1,
),
12 =>
array (
'id' => 13,
'country_id' => 2,
),
13 =>
array (
'id' => 14,
'country_id' => 2,
),
14 =>
array (
'id' => 15,
'country_id' => 2,
),
15 =>
array (
'id' => 16,
'country_id' => 2,
),
16 =>
array (
'id' => 17,
'country_id' => 2,
),
17 =>
array (
'id' => 18,
'country_id' => 2,
),
18 =>
array (
'id' => 19,
'country_id' => 2,
),
19 =>
array (
'id' => 20,
'country_id' => 2,
),
20 =>
array (
'id' => 21,
'country_id' => 2,
),
21 =>
array (
'id' => 22,
'country_id' => 2,
),
22 =>
array (
'id' => 23,
'country_id' => 2,
),
));
}
}

View File

@@ -0,0 +1,67 @@
<?php
namespace Database\Seeders;
use Illuminate\Database\Seeder;
use Illuminate\Support\Facades\DB;
class ExtendCategoriesSeeder extends Seeder
{
/**
* Run to extend the SiteContents categories without refreshing the database.
* Step 1: php artisan db:seed --class=ExtendCategoriesSeeder
* Step 2: php artisan db:seed --class=ExtendCategoryTranslationsSeeder
*
*/
public function run(): void
{
$categories = [
['type' => 'SiteContents\\Static\\WhyJoin'],
['type' => 'SiteContents\\Search\\Info'],
['type' => 'SiteContents\\Contacts'],
['type' => 'SiteContents\\Manage\\Posts'],
['type' => 'SiteContents\\Manage\\Calls'],
['type' => 'SiteContents\\Manage\\CallsAdmin'],
['type' => 'SiteContents\\Manage\\Categories'],
['type' => 'SiteContents\\Manage\\Tags'],
['type' => 'SiteContents\\Manage\\Profiles'],
['type' => 'SiteContents\\Manage\\Permissions'],
['type' => 'SiteContents\\Manage\\Roles'],
['type' => 'SiteContents\\Messenger\\Announcement'],
['type' => 'SiteContents\\Terms'],
['type' => 'SiteContents\\PrivacyPolicy'],
['type' => 'SiteContents\\AccountUsage\\Info'],
['type' => 'SiteContents\\Search\\Hints'],
['type' => 'SiteContents\\Search\\NoResults'],
['type' => 'SiteContents\\Errors\\503'],
['type' => 'SiteContents\\Errors\\500'],
['type' => 'SiteContents\\Errors\\429'],
['type' => 'SiteContents\\Errors\\419'],
['type' => 'SiteContents\\Errors\\404'],
['type' => 'SiteContents\\Errors\\403'],
['type' => 'SiteContents\\Errors\\402'],
['type' => 'SiteContents\\Errors\\401'],
['type' => 'SiteContents\\Report\\Error'],
['type' => 'SiteContents\\Report\\Issue'],
['type' => 'SiteContents\\MaintenanceAnnouncement'],
['type' => 'SiteContents\\ProfileIncomplete'],
['type' => 'App\\Models\\ImagePost'],
['type' => 'App\\Models\\ImagePost\\en'],
['type' => 'App\\Models\\ImagePost\\fr'],
['type' => 'App\\Models\\ImagePost\\nl'],
['type' => 'App\\Models\\ImagePost\\es'],
['type' => 'App\\Models\\ImagePost\\de'],
['type' => 'SiteContents\\Call\\NotAllowed'],
['type' => 'SiteContents\\Static\\OpenSource'],
];
foreach ($categories as $category) {
$exists = DB::table('categories')->where('type', $category['type'])->exists();
if (!$exists) {
DB::table('categories')->insert($category);
}
}
}
}

View File

@@ -0,0 +1,305 @@
<?php
namespace Database\Seeders;
use Illuminate\Database\Seeder;
use Illuminate\Support\Facades\DB;
class ExtendCategoryTranslationsSeeder extends Seeder
{
/**
* Run to extend the SiteContents category translations without refreshing the database.
* Usage:
* Step 1: php artisan db:seed --class=ExtendCategoriesSeeder
* Step 2: php artisan db:seed --class=ExtendCategoryTranslationsSeeder
*
*/
public function run(): void
{
$translations = [
'SiteContents\\Static\\OpenSource' => [
'en' => ['name' => 'Open source page', 'slug' => 'open-source-page'],
'nl' => ['name' => 'Open source pagina', 'slug' => 'open-source-pagina'],
'de' => ['name' => 'Open Source Seite', 'slug' => 'open-source-seite'],
'es' => ['name' => 'Página código abierto', 'slug' => 'pagina-codigo-abierto'],
'fr' => ['name' => 'Page open source', 'slug' => 'page-open-source'],
],
'SiteContents\\Static\\WhyJoin' => [
'en' => ['name' => 'Why join page', 'slug' => 'why-join-page'],
'nl' => ['name' => 'Waarom meedoen-pagina', 'slug' => 'waarom-meedoen-pagina'],
'de' => ['name' => 'Warum mitmachen Seite', 'slug' => 'warum-mitmachen-seite'],
'es' => ['name' => 'Por qué participar página', 'slug' => 'Por-que-participar-página'],
'fr' => ['name' => 'Pourquoi participer page', 'slug' => 'pourquoi-participer-page'],
],
'SiteContents\\Search\\Info' => [
'en' => ['name' => 'Search info page', 'slug' => 'search-info-page'],
'nl' => ['name' => 'Zoek info pagina', 'slug' => 'zoek-info-pagina'],
'de' => ['name' => 'Such-Info Seite', 'slug' => 'such-info-seite'],
'es' => ['name' => 'Página de información de búsqueda', 'slug' => 'pagina-de-informacion-de-busqueda'],
'fr' => ['name' => 'Page d\'information de recherche', 'slug' => 'page-d-information-de-recherche'],
],
'SiteContents\\AccountUsage\\Info' => [
'en' => ['name' => 'Account usage info page', 'slug' => 'account-usage-info-page'],
'nl' => ['name' => 'Accountgebruik info pagina', 'slug' => 'accountgebruik-info-pagina'],
'de' => ['name' => 'Kontonutzung Seite', 'slug' => 'kontonutzung-seite'],
'es' => ['name' => 'Uso de cuenta página', 'slug' => 'uso-de-cuenta-pagina'],
'fr' => ['name' => 'Utilisation du compte page', 'slug' => 'utilisation-du-compte-page'],
],
'SiteContents\\Contacts' => [
'en' => ['name' => 'Contacts', 'slug' => 'contacts'],
'nl' => ['name' => 'Contacten', 'slug' => 'contacten'],
'de' => ['name' => 'Kontakte', 'slug' => 'kontakte'],
'es' => ['name' => 'Contactos', 'slug' => 'contactos'],
'fr' => ['name' => 'Contacts', 'slug' => 'fr-contacts'],
],
'SiteContents\\Manage\\CallsAdmin' => [
'en' => ['name' => 'Calls admin page', 'slug' => 'calls-admin-page'],
'nl' => ['name' => 'Oproepen beheerpagina', 'slug' => 'oproepen-beheerpagina'],
'de' => ['name' => 'Aufrufe Adminseite', 'slug' => 'aufrufe-adminseite'],
'es' => ['name' => 'Página admin llamadas', 'slug' => 'pagina-admin-llamadas'],
'fr' => ['name' => 'Page admin appels', 'slug' => 'page-admin-appels'],
],
'SiteContents\\Manage\\Calls' => [
'en' => ['name' => 'Calls page', 'slug' => 'calls-page'],
'nl' => ['name' => 'Oproepen-pagina', 'slug' => 'oproepen-pagina'],
'de' => ['name' => 'Aufrufe Seite', 'slug' => 'aufrufe-seite'],
'es' => ['name' => 'Llamadas-página', 'slug' => 'llamadas-pagina'],
'fr' => ['name' => 'Appels-page', 'slug' => 'appels-page'],
],
'SiteContents\\Manage\\Posts' => [
'en' => ['name' => 'Posts page', 'slug' => 'posts-page'],
'nl' => ['name' => 'Artikelen-pagina', 'slug' => 'artikelen-pagina'],
'de' => ['name' => 'Beiträge Seite', 'slug' => 'beiträge-seite'],
'es' => ['name' => 'Publicaciones-página', 'slug' => 'publicaciones-página'],
'fr' => ['name' => 'Articles-page', 'slug' => 'articles-page'],
],
'SiteContents\\Manage\\Categories' => [
'en' => ['name' => 'Categories page', 'slug' => 'categories-page'],
'nl' => ['name' => 'Categorieën-pagina', 'slug' => 'categorieën-pagina'],
'de' => ['name' => 'Kategorien Seite', 'slug' => 'kategorien-seite'],
'es' => ['name' => 'Categorías-página', 'slug' => 'categorías-página'],
'fr' => ['name' => 'Catégories-page', 'slug' => 'fr-categories-page'],
],
'SiteContents\\Manage\\Tags' => [
'en' => ['name' => 'Tags page', 'slug' => 'tags-page'],
'nl' => ['name' => 'Labels pagina', 'slug' => 'labels-pagina'],
'de' => ['name' => 'Tags Seite', 'slug' => 'tags-seite'],
'es' => ['name' => 'Etiquetas-página', 'slug' => 'etiquetas-página'],
'fr' => ['name' => 'Étiquettes-page', 'slug' => 'étiquettes-page'],
],
'SiteContents\\Manage\\Profiles' => [
'en' => ['name' => 'Profiles page', 'slug' => 'profiles-page'],
'nl' => ['name' => 'Profielen-pagina', 'slug' => 'profielen-pagina'],
'de' => ['name' => 'Profile Seite', 'slug' => 'profile-seite'],
'es' => ['name' => 'Perfiles-página', 'slug' => 'perfiles-página'],
'fr' => ['name' => 'Profils-page', 'slug' => 'profils-page'],
],
'SiteContents\\Manage\\Permissions' => [
'en' => ['name' => 'Permissions page', 'slug' => 'permissions-page'],
'nl' => ['name' => 'Rechten-pagina', 'slug' => 'rechten-pagina'],
'de' => ['name' => 'Berechtigungen Seite', 'slug' => 'berechtigungen-seite'],
'es' => ['name' => 'Permisos-página', 'slug' => 'permisos-página'],
'fr' => ['name' => 'Permissions page', 'slug' => 'fr-permissions-page'],
],
'SiteContents\\Manage\\Roles' => [
'en' => ['name' => 'Roles page', 'slug' => 'roles-page'],
'nl' => ['name' => 'Rollen-pagina', 'slug' => 'rollen-pagina'],
'de' => ['name' => 'Rollen Seite', 'slug' => 'rollen-seite'],
'es' => ['name' => 'Roles-página', 'slug' => 'roles-página'],
'fr' => ['name' => 'Rôles-page', 'slug' => 'fr-roles-page'],
],
'SiteContents\\Messenger\\Announcement' => [
'en' => ['name' => 'Messenger Announcement', 'slug' => 'messenger-announcement'],
'nl' => ['name' => 'Messenger aankondiging', 'slug' => 'messenger-aankondiging'],
'de' => ['name' => 'Messenger Ankündigung', 'slug' => 'messenger-ankündigung'],
'es' => ['name' => 'Anuncio mensajero', 'slug' => 'anuncio-mensajero'],
'fr' => ['name' => 'Annonce messager', 'slug' => 'annonce-messager'],
],
'SiteContents\\Terms' => [
'en' => ['name' => 'Terms of Service', 'slug' => 'terms-of-service'],
'nl' => ['name' => 'Algemene voorwaarden', 'slug' => 'algemene-voorwaarden'],
'de' => ['name' => 'Nutzungsbedingungen', 'slug' => 'nutzungsbedingungen'],
'es' => ['name' => 'Términos de servicio', 'slug' => 'terminos-de-servicio'],
'fr' => ['name' => 'Conditions d\'utilisation', 'slug' => 'conditions-d-utilisation'],
],
'SiteContents\\PrivacyPolicy' => [
'en' => ['name' => 'Privacy Policy', 'slug' => 'privacy-policy'],
'nl' => ['name' => 'Privacybeleid', 'slug' => 'privacybeleid'],
'de' => ['name' => 'Datenschutzrichtlinie', 'slug' => 'datenschutzrichtlinie'],
'es' => ['name' => 'Política de privacidad', 'slug' => 'politica-de-privacidad'],
'fr' => ['name' => 'Politique de confidentialité', 'slug' => 'politique-de-confidentialite'],
],
'SiteContents\\Search\\Hints' => [
'en' => ['name' => 'Search hints page', 'slug' => 'search-hints-page'],
'nl' => ['name' => 'Zoektips pagina', 'slug' => 'zoektips-pagina'],
'de' => ['name' => 'Suchhinweise Seite', 'slug' => 'suchhinweise-seite'],
'es' => ['name' => 'Consejos de búsqueda página', 'slug' => 'consejos-de-busqueda-pagina'],
'fr' => ['name' => 'Conseils de recherche page', 'slug' => 'conseils-de-recherche-page'],
],
'SiteContents\\Search\\NoResults' => [
'en' => ['name' => 'Search no results page', 'slug' => 'search-no-results-page'],
'nl' => ['name' => 'Zoeken geen resultaten pagina', 'slug' => 'zoeken-geen-resultaten-pagina'],
'de' => ['name' => 'Suche keine Ergebnisse Seite', 'slug' => 'suche-keine-ergebnisse-seite'],
'es' => ['name' => 'Búsqueda sin resultados página', 'slug' => 'busqueda-sin-resultados-pagina'],
'fr' => ['name' => 'Recherche sans résultats page', 'slug' => 'recherche-sans-resultats-page'],
],
'SiteContents\\Errors\\503' => [
'en' => ['name' => 'Service Unavailable page', 'slug' => 'error-503-service-unavailable-page'],
'nl' => ['name' => 'Service niet beschikbaar pagina', 'slug' => 'fout-503-service-niet-beschikbaar-pagina'],
'de' => ['name' => 'Dienst nicht verfügbar Seite', 'slug' => 'fehler-503-dienst-nicht-verfugbar-seite'],
'es' => ['name' => 'Servicio no disponible página', 'slug' => 'error-503-servicio-no-disponible-pagina'],
'fr' => ['name' => 'Service indisponible page', 'slug' => 'erreur-503-service-indisponible-page'],
],
'SiteContents\\Errors\\500' => [
'en' => ['name' => 'Internal Server Error page', 'slug' => 'error-500-internal-server-error-page'],
'nl' => ['name' => 'Interne serverfout pagina', 'slug' => 'fout-500-interne-serverfout-pagina'],
'de' => ['name' => 'Interner Serverfehler Seite', 'slug' => 'fehler-500-interner-serverfehler-seite'],
'es' => ['name' => 'Error interno del servidor página', 'slug' => 'error-500-error-interno-del-servidor-pagina'],
'fr' => ['name' => 'Erreur interne du serveur page', 'slug' => 'erreur-500-erreur-interne-du-serveur-page'],
],
'SiteContents\\Errors\\429' => [
'en' => ['name' => 'Too Many Requests page', 'slug' => 'error-429-too-many-requests-page'],
'nl' => ['name' => 'Te veel verzoeken pagina', 'slug' => 'fout-429-te-veel-verzoeken-pagina'],
'de' => ['name' => 'Zu viele Anfragen Seite', 'slug' => 'fehler-429-zu-viele-anfragen-seite'],
'es' => ['name' => 'Demasiadas solicitudes página', 'slug' => 'error-429-demasiadas-solicitudes'],
'fr' => ['name' => 'Trop de demandes page', 'slug' => 'erreur-429-trop-de-demandes-page'],
],
'SiteContents\\Errors\\419' => [
'en' => ['name' => 'Page Expired page', 'slug' => 'error-419-page-expired-page'],
'nl' => ['name' => 'Pagina verlopen pagina', 'slug' => 'fout-419-pagina-verlopen-pagina'],
'de' => ['name' => 'Seite abgelaufen Seite', 'slug' => 'fehler-419-seite-abgelaufen-seite'],
'es' => ['name' => 'Página expirada página', 'slug' => 'error-419-pagina-expirada-pagina'],
'fr' => ['name' => 'Page expirée page', 'slug' => 'erreur-419-page-expiree-page'],
],
'SiteContents\\Errors\\404' => [
'en' => ['name' => 'Not Found page', 'slug' => 'error-404-not-found-page'],
'nl' => ['name' => 'Niet gevonden pagina', 'slug' => 'fout-404-niet-gevonden-pagina'],
'de' => ['name' => 'Nicht gefunden Seite', 'slug' => 'fehler-404-nicht-gefunden-seite'],
'es' => ['name' => 'No encontrado página', 'slug' => 'error-404-no-encontrado-pagina'],
'fr' => ['name' => 'Non trouvé page', 'slug' => 'erreur-404-non-trouve-page'],
],
'SiteContents\\Errors\\403' => [
'en' => ['name' => 'Forbidden page', 'slug' => 'error-403-forbidden-page'],
'nl' => ['name' => 'Verboden pagina', 'slug' => 'fout-403-verboden-pagina'],
'de' => ['name' => 'Verboten Seite', 'slug' => 'fehler-403-verboten-seite'],
'es' => ['name' => 'Prohibido página', 'slug' => 'error-403-prohibido-pagina'],
'fr' => ['name' => 'Interdit page', 'slug' => 'erreur-403-interdit-page'],
],
'SiteContents\\Errors\\402' => [
'en' => ['name' => 'Payment Required page', 'slug' => 'error-402-payment-required-page'],
'nl' => ['name' => 'Betaling vereist pagina', 'slug' => 'fout-402-betaling-vereist-pagina'],
'de' => ['name' => 'Bezahlung erforderlich Seite', 'slug' => 'fehler-402-bezahlung-erforderlich-seite'],
'es' => ['name' => 'Pago requerido página', 'slug' => 'error-402-pago-requerido-pagina'],
'fr' => ['name' => 'Paiement requis page', 'slug' => 'erreur-402-paiement-requis-page'],
],
'SiteContents\\Errors\\401' => [
'en' => ['name' => 'Unauthorized page', 'slug' => 'error-401-unauthorized-page'],
'nl' => ['name' => 'Niet geautoriseerd pagina', 'slug' => 'fout-401-niet-geautoriseerd-pagina'],
'de' => ['name' => 'Nicht autorisiert Seite', 'slug' => 'fehler-401-nicht-autorisiert-seite'],
'es' => ['name' => 'No autorizado página', 'slug' => 'error-401-no-autorizado-pagina'],
'fr' => ['name' => 'Non autorisé page', 'slug' => 'erreur-401-non-autorise-page'],
],
'SiteContents\\Report\\Error' => [
'en' => ['name' => 'Report an error page', 'slug' => 'report-error-page'],
'nl' => ['name' => 'Een fout melden pagina', 'slug' => 'fout-melden-pagina'],
'de' => ['name' => 'Einen Fehler melden Seite', 'slug' => 'fehler-melden-seite'],
'es' => ['name' => 'Reportar un error página', 'slug' => 'reportar-un-error-pagina'],
'fr' => ['name' => 'Signaler une erreur page', 'slug' => 'signaler-une-erreur-page'],
],
'SiteContents\\Report\\Issue' => [
'en' => ['name' => 'Report an issue page', 'slug' => 'report-issue-page'],
'nl' => ['name' => 'Meld een probleem pagina', 'slug' => 'meld-probleem-pagina'],
'de' => ['name' => 'Ein Problem melden', 'slug' => 'problem-melden-seite'],
'es' => ['name' => 'Reportar un problema página', 'slug' => 'reportar-un-problema-pagina'],
'fr' => ['name' => 'Signaler un problème page', 'slug' => 'signaler-un-probleme-page'],
],
'SiteContents\\MaintenanceAnnouncement' => [
'en' => ['name' => 'Maintenance-announcement', 'slug' => 'maintenance-announcement'],
'nl' => ['name' => 'Onderhoudsmelding', 'slug' => 'onderhoudsmelding'],
'de' => ['name' => 'Wartungsankündigung', 'slug' => 'wartungsankundigung'],
'es' => ['name' => 'Aviso de mantenimiento', 'slug' => 'aviso-de-mantenimiento'],
'fr' => ['name' => 'Annonce de maintenance', 'slug' => 'annonce-de-maintenance'],
],
'SiteContents\\ProfileIncomplete' => [
'en' => ['name' => 'Profile Incomplete Warning', 'slug' => 'profile-incomplete-warning'],
'nl' => ['name' => 'Profiel Incompleet Waarschuwing', 'slug' => 'profiel-incompleet-waarschuwing'],
'de' => ['name' => 'Unvollständiges Profil Warnung', 'slug' => 'unvollstandiges-profil-warnung'],
'es' => ['name' => 'Advertencia de Perfil Incompleto', 'slug' => 'advertencia-de-perfil-incompleto'],
'fr' => ['name' => 'Avertissement Profil Incomplet', 'slug' => 'avertissement-profil-incomplet'],
],
'SiteContents\\Call\\NotAllowed' => [
'en' => ['name' => 'Call not allowed', 'slug' => 'call-not-allowed'],
'nl' => ['name' => 'Oproep niet toegestaan', 'slug' => 'oproep-niet-toegestaan'],
'de' => ['name' => 'Anruf nicht erlaubt', 'slug' => 'anruf-nicht-erlaubt'],
'es' => ['name' => 'Llamada no permitida', 'slug' => 'llamada-no-permitida'],
'fr' => ['name' => 'Appel non autorisé', 'slug' => 'appel-non-autorise'],
],
'App\\Models\\ImagePost' => [
'en' => ['name' => 'Image', 'slug' => 'image'],
'nl' => ['name' => 'Beeld', 'slug' => 'beeld'],
'de' => ['name' => 'Bild', 'slug' => 'bild'],
'es' => ['name' => 'Imagen', 'slug' => 'imagen'],
'fr' => ['name' => 'Image', 'slug' => 'image-fr'],
],
'App\\Models\\ImagePost\\en' => [
'en' => ['name' => 'Image - English', 'slug' => 'image-english'],
'nl' => ['name' => 'Beeld - Engels', 'slug' => 'beeld-engels'],
'de' => ['name' => 'Bild - Englisch', 'slug' => 'bild-englisch'],
'es' => ['name' => 'Imagen - Inglés', 'slug' => 'imagen-ingles'],
'fr' => ['name' => 'Image - Anglais', 'slug' => 'image-anglais'],
],
'App\\Models\\ImagePost\\fr' => [
'en' => ['name' => 'Image - French', 'slug' => 'image-french'],
'nl' => ['name' => 'Beeld - Frans', 'slug' => 'beeld-frans'],
'de' => ['name' => 'Bild - Französisch', 'slug' => 'bild-franzosisch'],
'es' => ['name' => 'Imagen - Francés', 'slug' => 'imagen-frances'],
'fr' => ['name' => 'Image - Français', 'slug' => 'image-francais'],
],
'App\\Models\\ImagePost\\nl' => [
'en' => ['name' => 'Image - Dutch', 'slug' => 'image-dutch'],
'nl' => ['name' => 'Beeld - Nederlands', 'slug' => 'beeld-nederlands'],
'de' => ['name' => 'Bild - Niederländisch', 'slug' => 'bild-niederlandisch'],
'es' => ['name' => 'Imagen - Holandés', 'slug' => 'imagen-holandes'],
'fr' => ['name' => 'Image - Néerlandais', 'slug' => 'image-neerlandais'],
],
'App\\Models\\ImagePost\\es' => [
'en' => ['name' => 'Image - Spanish', 'slug' => 'image-spanish'],
'nl' => ['name' => 'Beeld - Spaans', 'slug' => 'beeld-spaans'],
'de' => ['name' => 'Bild - Spanisch', 'slug' => 'bild-spanisch'],
'es' => ['name' => 'Imagen - Español', 'slug' => 'imagen-espanol'],
'fr' => ['name' => 'Image - Espagnol', 'slug' => 'image-espagnol'],
],
'App\\Models\\ImagePost\\de' => [
'en' => ['name' => 'Image - German', 'slug' => 'image-german'],
'nl' => ['name' => 'Beeld - Duits', 'slug' => 'beeld-duits'],
'de' => ['name' => 'Bild - Deutsch', 'slug' => 'bild-deutsch'],
'es' => ['name' => 'Imagen - Alemán', 'slug' => 'imagen-aleman'],
'fr' => ['name' => 'Image - Allemand', 'slug' => 'image-allemand'],
],
];
foreach ($translations as $type => $locales) {
$category = DB::table('categories')->where('type', $type)->first();
if ($category) {
foreach ($locales as $locale => $translation) {
$exists = DB::table('category_translations')
->where('category_id', $category->id)
->where('locale', $locale)
->exists();
if (!$exists) {
DB::table('category_translations')->insert([
'category_id' => $category->id,
'locale' => $locale,
'slug' => $translation['slug'],
'name' => $translation['name'],
'created_at' => now(),
'updated_at' => now(),
]);
}
}
}
}
}
}

View File

@@ -0,0 +1,36 @@
<?php
namespace Database\Seeders;
use Illuminate\Database\Seeder;
class LanguageCompetencesTableSeeder extends Seeder
{
/**
* Auto generated seed file
*
* @return void
*/
public function run()
{
\DB::table('language_competences')->delete();
\DB::table('language_competences')->insert(array (
0 =>
array (
'id' => 1,
'name' => 'good',
),
1 =>
array (
'id' => 2,
'name' => 'limited',
),
));
}
}

View File

@@ -0,0 +1,61 @@
<?php
namespace Database\Seeders;
use Illuminate\Database\Seeder;
class LanguagesTableSeeder extends Seeder
{
/**
* Auto generated seed file
*
* @return void
*/
public function run()
{
\DB::table('languages')->delete();
\DB::table('languages')->insert(array (
0 =>
array (
'id' => 1,
'name' => 'Dutch',
'lang_code' => 'nl',
'flag' => '🇳🇱',
),
1 =>
array (
'id' => 2,
'name' => 'English',
'lang_code' => 'en',
'flag' => '🇬🇧',
),
2 =>
array (
'id' => 3,
'name' => 'French',
'lang_code' => 'fr',
'flag' => '🇫🇷',
),
3 =>
array (
'id' => 4,
'name' => 'German',
'lang_code' => 'de',
'flag' => '🇩🇪',
),
4 =>
array (
'id' => 5,
'name' => 'Spanish',
'lang_code' => 'es',
'flag' => '🇪🇸',
),
));
}
}

View File

@@ -0,0 +1,98 @@
<?php
namespace Database\Seeders;
use Illuminate\Database\Seeder;
class LoveReactionTypesTableSeeder extends Seeder
{
/**
* Auto generated seed file
*
* @return void
*/
public function run()
{
\DB::table('love_reaction_types')->delete();
\DB::table('love_reaction_types')->insert(array (
0 =>
array (
'id' => 1,
'name' => 'Star',
'mass' => 1,
'created_at' => '2023-08-05 03:51:05',
'updated_at' => '2023-06-13 22:42:51',
),
1 =>
array (
'id' => 2,
'name' => 'Bookmark',
'mass' => 1,
'created_at' => '2025-08-06 16:11:43',
'updated_at' => '2025-08-06 16:11:43',
),
2 =>
array (
'id' => 3,
'name' => 'Like',
'mass' => 1,
'created_at' => '2025-08-06 16:12:22',
'updated_at' => '2025-08-06 16:12:22',
),
3 =>
array (
'id' => 4,
'name' => 'Dislike',
'mass' => 1,
'created_at' => '2025-08-06 16:12:33',
'updated_at' => '2025-08-06 16:12:33',
),
4 =>
array (
'id' => 5,
'name' => 'Vote',
'mass' => 1,
'created_at' => '2025-08-06 16:12:47',
'updated_at' => '2025-08-06 16:12:47',
),
5 =>
array (
'id' => 6,
'name' => 'Work',
'mass' => 1,
'created_at' => '2025-08-10 15:07:26',
'updated_at' => '2025-08-10 15:07:26',
),
6 =>
array (
'id' => 7,
'name' => 'Gift',
'mass' => 1,
'created_at' => '2025-08-10 15:07:36',
'updated_at' => '2025-08-10 15:07:36',
),
7 =>
array (
'id' => 8,
'name' => 'Donation',
'mass' => 1,
'created_at' => '2025-08-10 15:07:52',
'updated_at' => '2025-08-10 15:07:52',
),
8 =>
array (
'id' => 9,
'name' => 'Reserve',
'mass' => 1,
'created_at' => '2025-08-10 15:08:00',
'updated_at' => '2025-08-10 15:08:00',
),
));
}
}

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,68 @@
<?php
namespace Database\Seeders;
use Illuminate\Database\Seeder;
class MeetingsTableSeeder extends Seeder
{
/**
* Auto generated seed file
*
* @return void
*/
public function run()
{
\DB::table('meetings')->delete();
\DB::table('meetings')->insert(array (
0 =>
array (
'id' => 4,
'post_id' => 14,
'address' => '3',
'meetingable_id' => NULL,
'meetingable_type' => NULL,
'status' => 1,
'from' => '2023-07-01 23:00:00',
'till' => NULL,
'created_at' => '2023-07-29 22:19:38',
'updated_at' => '2023-07-29 23:09:36',
'deleted_at' => NULL,
),
1 =>
array (
'id' => 5,
'post_id' => 15,
'address' => NULL,
'meetingable_id' => NULL,
'meetingable_type' => NULL,
'status' => 1,
'from' => NULL,
'till' => NULL,
'created_at' => '2023-07-29 22:30:08',
'updated_at' => '2023-07-29 22:30:08',
'deleted_at' => NULL,
),
2 =>
array (
'id' => 6,
'post_id' => 13,
'address' => NULL,
'meetingable_id' => NULL,
'meetingable_type' => NULL,
'status' => 1,
'from' => '2023-07-20 22:30:00',
'till' => NULL,
'created_at' => '2023-07-29 22:30:58',
'updated_at' => '2023-07-29 22:57:03',
'deleted_at' => NULL,
),
));
}
}

View File

@@ -0,0 +1,28 @@
<?php
namespace Database\Seeders;
use App\Models\Account;
use App\Models\Organization;
use Illuminate\Database\Eloquent\Factories\Sequence;
use Illuminate\Database\Seeder;
class OrganizationSeeder extends Seeder
{
/**
* Run the database seeds.
*
* @return void
*/
public function run()
{
$orgCount = max((int)$this->command->ask('How many fake organizations would you like?', 10), 0);
Organization::factory()->count($orgCount)
->has(Account::factory()->count(3)->state(new Sequence(
['name' => 'Organization Account'],
['name' => 'Project 1 Account'],
['name' => 'Project 2 Account']
)))
->create();
}
}

View File

@@ -0,0 +1,154 @@
<?php
namespace Database\Seeders;
use Illuminate\Database\Seeder;
use Illuminate\Support\Facades\DB;
use Spatie\Permission\Models\Permission;
use Spatie\Permission\Models\Role;
use Spatie\Permission\PermissionRegistrar;
class PermissionRoleSeeder extends Seeder
{
/**
* Create the initial roles and permissions.
* To re-seed this PermissionRoleSeeder after any changes use:
* php artisan db:seed --class=PermissionRoleSeeder
*
* @return void
*/
public function run()
{
// Reset cached roles and permissions
app()[PermissionRegistrar::class]->forgetCachedPermissions();
// Disable foreign key constraints
DB::statement('SET FOREIGN_KEY_CHECKS=0;');
// Truncate the tables in case you are re-seeding
DB::table('role_has_permissions')->truncate();
DB::table('roles')->truncate();
DB::table('permissions')->truncate();
// Comment line below to preserve the existing roles attached to the models
//DB::table('model_has_roles')->truncate();
// Comment line below to preserve the existing permissions attached to the models
//DB::table('model_has_permissions')->truncate();
// Re-enable foreign key constraints
DB::statement('SET FOREIGN_KEY_CHECKS=1;');
// create permissions
Permission::create(['name' => 'create posts']);
Permission::create(['name' => 'update posts']);
Permission::create(['name' => 'delete posts']);
Permission::create(['name' => 'publish posts']);
Permission::create(['name' => 'unpublish posts']);
Permission::create(['name' => 'manage posts']); // all permissions regarding posts
Permission::create(['name' => 'create tags']);
Permission::create(['name' => 'update tags']);
Permission::create(['name' => 'delete tags']);
Permission::create(['name' => 'manage tags']); // all permissions regarding tags
Permission::create(['name' => 'create categories']);
Permission::create(['name' => 'update categories']);
Permission::create(['name' => 'delete categories']);
Permission::create(['name' => 'manage categories']); // all permissions regarding categories
Permission::create(['name' => 'create mailings']);
Permission::create(['name' => 'update mailings']);
Permission::create(['name' => 'delete mailings']);
Permission::create(['name' => 'manage mailings']); // all permissions regarding mailings
Permission::create(['name' => 'create users']);
Permission::create(['name' => 'update users']);
Permission::create(['name' => 'delete users']);
Permission::create(['name' => 'manage users']); // all permissions regarding users
Permission::create(['name' => 'create user_projects']);
Permission::create(['name' => 'update user_projects']);
Permission::create(['name' => 'delete user_projects']);
Permission::create(['name' => 'manage user_projects']); // all permissions regarding user_projects
Permission::create(['name' => 'create organizations']);
Permission::create(['name' => 'update organizations']);
Permission::create(['name' => 'delete organizations']);
Permission::create(['name' => 'manage organizations']); // all permissions regarding organizations
Permission::create(['name' => 'create banks']);
Permission::create(['name' => 'update banks']);
Permission::create(['name' => 'delete banks']);
Permission::create(['name' => 'manage banks']); // all permissions regarding banks
Permission::create(['name' => 'create admins']);
Permission::create(['name' => 'update admins']);
Permission::create(['name' => 'delete admins']);
Permission::create(['name' => 'manage admins']); // all permissions regarding admins
Permission::create(['name' => 'create accounts']);
Permission::create(['name' => 'update accounts']);
Permission::create(['name' => 'delete accounts']);
Permission::create(['name' => 'manage accounts']); // all permissions regarding accounts
Permission::create(['name' => 'manage profiles']); // all permissions regarding all profiles (users, organizations, banks, admins)
Permission::create(['name' => 'manage permissions']); // all permissions regarding permissions
Permission::create(['name' => 'manage roles']); // all permissions regarding roles
// create roles and assign existing permissions
$siteEditor = Role::create(['name' => 'site-editor']);
$siteEditor->givePermissionTo('manage posts');
$siteEditor->givePermissionTo('manage tags');
$siteEditor->givePermissionTo('manage categories');
$bankAdmin = Role::create(['name' => 'bank-manager']);
$bankAdmin->givePermissionTo('manage users');
$bankAdmin->givePermissionTo('manage user_projects');
$bankAdmin->givePermissionTo('manage organizations');
$bankAdmin->givePermissionTo('manage accounts');
$admin = Role::create(['name' => 'admin']);
$admin->givePermissionTo('manage posts');
$admin->givePermissionTo('manage tags');
$admin->givePermissionTo('manage categories');
$admin->givePermissionTo('manage mailings');
$admin->givePermissionTo('manage users');
$admin->givePermissionTo('manage user_projects');
$admin->givePermissionTo('manage organizations');
$admin->givePermissionTo('manage banks');
$admin->givePermissionTo('manage admins');
$admin->givePermissionTo('manage profiles');
$admin->givePermissionTo('manage accounts');
$admin->givePermissionTo('manage permissions');
$admin->givePermissionTo('manage roles');
$organizationCoordinator = Role::create(['name' => 'organization-coordinator']);
$organizationCoordinator->givePermissionTo('manage organizations');
$bankCoordinator = Role::create(['name' => 'bank-coordinator']);
$bankCoordinator->givePermissionTo('manage banks');
$superAdmin = Role::create(['name' => 'super-admin']);
// Gets all permissions via Gate::before rule; see AuthServiceProvider
// // create demo users
// $user = \App\Models\User::factory()->create([
// 'name' => 'Example User',
// 'email' => 'test@example.com',
// ]);
// $user->assignRole($siteEditor);
// $user = \App\Models\User::factory()->create([
// 'name' => 'Example Admin User',
// 'email' => 'admin@example.com',
// ]);
// $user->assignRole($bankAdmin);
// $user = \App\Models\User::factory()->create([
// 'name' => 'Example Super-Admin User',
// 'email' => 'superadmin@example.com',
// ]);
// $user->assignRole($role3);
}
}

View File

@@ -0,0 +1,100 @@
<?php
namespace Database\Seeders;
use App\Models\Post;
use App\Models\PostTranslation;
use Illuminate\Database\Seeder;
use Illuminate\Support\Facades\DB;
class PlaceholderPostsSeeder extends Seeder
{
/**
* Create placeholder posts for all SiteContents categories
* These posts have only titles in all available languages for each category
*
* Usage:
* php artisan db:seed --class=PlaceholderPostsSeeder
*/
public function run(): void
{
// Get all categories where type starts with 'SiteContents\'
$categories = DB::table('categories')
->get()
->filter(function ($category) {
return str_starts_with($category->type, 'SiteContents\\');
});
$totalCategories = $categories->count();
$processed = 0;
$created = 0;
$skipped = 0;
$this->command->info("Found {$totalCategories} SiteContents categories");
foreach ($categories as $category) {
$processed++;
// Check if a post already exists for this category
$postExists = DB::table('posts')
->where('category_id', $category->id)
->exists();
if ($postExists) {
// Skip if post already exists for this category
$skipped++;
$this->command->info("[{$processed}/{$totalCategories}] Skipped {$category->type} (already exists)");
continue;
}
// Get available locales for this category
$categoryTranslations = DB::table('category_translations')
->where('category_id', $category->id)
->get();
// Skip if no translations exist for this category
if ($categoryTranslations->isEmpty()) {
$skipped++;
$this->command->warn("[{$processed}/{$totalCategories}] Skipped {$category->type} (no translations)");
continue;
}
// Create the post using Eloquent without dispatching events
$post = Post::withoutEvents(function () use ($category) {
return Post::create([
'postable_id' => 1,
'postable_type' => 'App\\Models\\Admin',
'category_id' => $category->id,
]);
});
$translationCount = 0;
// Create post translations for each available locale
foreach ($categoryTranslations as $categoryTranslation) {
$title = "Placeholder: {$categoryTranslation->name}";
PostTranslation::create([
'post_id' => $post->id,
'locale' => $categoryTranslation->locale,
'title' => $title,
'excerpt' => null,
'content' => null,
'status' => 1,
'updated_by_user_id' => null,
'from' => null,
'till' => null,
]);
$translationCount++;
}
$created++;
$this->command->info("[{$processed}/{$totalCategories}] Created post for {$category->type} ({$translationCount} translations)");
}
$this->command->info("\n✓ Seeding completed!");
$this->command->info(" Created: {$created} posts");
$this->command->info(" Skipped: {$skipped} posts");
}
}

View File

@@ -0,0 +1,741 @@
<?php
namespace Database\Seeders;
use Illuminate\Database\Seeder;
class PostTranslationsTableSeeder extends Seeder
{
/**
* Auto generated seed file
*
* @return void
*/
public function run()
{
\DB::table('post_translations')->delete();
\DB::table('post_translations')->insert(array (
0 =>
array (
'id' => 15,
'post_id' => 13,
'locale' => 'en',
'slug' => 'timebanking-what-is-it-good-for',
'title' => 'Timebanking, what is it good for ?!',
'excerpt' => 'An event especially for Lekkernassûh employees and tasty timebankers about why Lekkernassûh works with Timebank and how you can immediately do more, with your Timebank Hours.',
'content' => '<p>After a short presentation on how and why Lekkernassûh and Timebank team up, there will also be a matchmaking session. Find out what you can do with your timebank hours within The Hague. It does not matter whether you are a regular employee of Lekkernassuh or if you havent got any hours on your account yet. The one thing that you will need however, is a Timebank.cc account (registering only takes 2 min of your own time).</p><p>Timebank.cc is a non-profit currency to value worked time. Use it to share skills, knowledge or help (locally) in an honest and transparent way. For more information, visit timebank.cc.</p><p>Everyone is welcome on 5 July to discover why Lekkernassûh Timebank.cc are a good match!</p><p>Great if you send us an email to sign up:</p><p><a href="mailto:info@timebank.cc?subject=Reservering 5 juli&amp;body=Hallo Timebank,%0A%0A Graag kom naar het evenement op 5 juli.%0A%0ATot woe 5 jui!%0A%0A%0A" rel="noopener noreferrer" target="_blank">info@timebank.cc</a></p>',
'status' => 1,
'updated_by_user_id' => 161,
'from' => '2023-07-05 20:00:00',
'till' => NULL,
'created_at' => '2023-07-29 21:44:43',
'updated_at' => '2025-06-27 16:03:12',
'deleted_at' => NULL,
),
1 =>
array (
'id' => 16,
'post_id' => 13,
'locale' => 'nl',
'slug' => 'timebanken-waar-is-dat-goed-voor-2',
'title' => 'Timebanken waar is dat goed voor ?!',
'excerpt' => 'Een evenement speciaal voor Lekkernassûh medewerkers en lekker nassûhende timebankers over waarom Lekkernassûh met Timebank werkt en hoe je direct méér, met je Timebank Uren kunt doen.',
'content' => '<p>Na een korte presentatie over het hoe en waarom is er ook een matchmaking sessie. Ontdek waar jij je timebank uren allemaal voor kunt gebruiken binnen Den Haag. Het maakt niet uit of je een vaste medewerker bent van Lekkernassuh of dat je nog niets op op je rekening hebt staan. Het enige dat wél al handig is, is een Timebank.cc rekening (registreren kost slechts 2 min van je eigen tijd).</p><p>Timebank.cc is een munteenheid voor gewerkte tijd waarbij géén winst kan worden gemaakt. Bedoelt om (lokaal) op een eerlijke en transparante manier vaardigheden, kennis of hulp te kunnen delen. Kijk voor meer informatie op timebank.cc.</p><p>Iedereen is dus 5 juli welkom om te ontdekken waarom Lekkernassûh Timebank.cc een goede match zijn!</p><p>Fijn als je ons een mailtje stuurt om je aan te melden:</p><p> <a href="mailto:info@timebank.cc?subject=Reservering 5 juli&amp;body=Hallo Timebank,%0A%0A Graag kom naar het evenement op 5 juli.%0A%0ATot woe 5 jui!%0A%0A%0A" rel="noopener noreferrer" target="_blank">info@timebank.cc</a></p>',
'status' => 1,
'updated_by_user_id' => 161,
'from' => '2023-07-05 21:45:00',
'till' => NULL,
'created_at' => '2023-07-29 21:45:06',
'updated_at' => '2025-06-27 16:03:40',
'deleted_at' => NULL,
),
2 =>
array (
'id' => 17,
'post_id' => 14,
'locale' => 'en',
'slug' => 'empty-event-2',
'title' => 'Empty event 2',
'excerpt' => '',
'content' => NULL,
'status' => 1,
'updated_by_user_id' => NULL,
'from' => '2023-07-26 21:49:00',
'till' => NULL,
'created_at' => '2023-07-29 21:49:40',
'updated_at' => '2023-07-29 22:28:58',
'deleted_at' => NULL,
),
3 =>
array (
'id' => 18,
'post_id' => 14,
'locale' => 'nl',
'slug' => 'leeg-evenement-2',
'title' => 'Leeg evenement 2',
'excerpt' => '',
'content' => NULL,
'status' => 1,
'updated_by_user_id' => NULL,
'from' => '2023-07-26 21:49:00',
'till' => NULL,
'created_at' => '2023-07-29 22:29:28',
'updated_at' => '2023-07-30 10:11:40',
'deleted_at' => NULL,
),
4 =>
array (
'id' => 19,
'post_id' => 15,
'locale' => 'nl',
'slug' => 'third-event',
'title' => 'Third event',
'excerpt' => '',
'content' => NULL,
'status' => 1,
'updated_by_user_id' => 161,
'from' => NULL,
'till' => '2025-06-25 15:43:04',
'created_at' => '2023-07-29 22:30:08',
'updated_at' => '2025-06-25 15:43:04',
'deleted_at' => '2025-06-25 15:43:04',
),
5 =>
array (
'id' => 20,
'post_id' => 16,
'locale' => 'en',
'slug' => 'oud-nieuws',
'title' => 'Oud nieuws',
'excerpt' => '',
'content' => NULL,
'status' => 1,
'updated_by_user_id' => 161,
'from' => '2023-07-01 23:00:00',
'till' => '2025-06-25 15:42:33',
'created_at' => '2023-07-29 23:00:21',
'updated_at' => '2025-06-25 15:42:33',
'deleted_at' => '2025-06-25 15:42:33',
),
6 =>
array (
'id' => 21,
'post_id' => 17,
'locale' => 'en',
'slug' => 'vers-nieuws',
'title' => 'Vers nieuws',
'excerpt' => '',
'content' => NULL,
'status' => 1,
'updated_by_user_id' => 161,
'from' => '2023-07-29 23:00:00',
'till' => '2025-06-25 15:42:33',
'created_at' => '2023-07-29 23:00:53',
'updated_at' => '2025-06-25 15:42:33',
'deleted_at' => '2025-06-25 15:42:33',
),
7 =>
array (
'id' => 22,
'post_id' => 18,
'locale' => 'en',
'slug' => 'antwerp-division-event-coming-up',
'title' => 'Antwerp division event coming up!',
'excerpt' => 'cxnvx,nxv,mvdzm',
'content' => NULL,
'status' => 1,
'updated_by_user_id' => 161,
'from' => '2023-08-04 14:09:00',
'till' => '2025-06-25 15:43:56',
'created_at' => '2023-08-04 14:09:47',
'updated_at' => '2025-06-25 15:43:56',
'deleted_at' => '2025-06-25 15:43:56',
),
8 =>
array (
'id' => 23,
'post_id' => 19,
'locale' => 'en',
'slug' => 'germany-national-event',
'title' => 'Germany national event',
'excerpt' => 'zcfgjh',
'content' => NULL,
'status' => 1,
'updated_by_user_id' => 161,
'from' => '2023-08-04 14:42:00',
'till' => '2025-06-25 15:43:56',
'created_at' => '2023-08-04 14:42:31',
'updated_at' => '2025-06-25 15:43:56',
'deleted_at' => '2025-06-25 15:43:56',
),
9 =>
array (
'id' => 24,
'post_id' => 20,
'locale' => 'en',
'slug' => 'antwerp-division-news',
'title' => 'Antwerp division News',
'excerpt' => 'dsjhjfds',
'content' => NULL,
'status' => 1,
'updated_by_user_id' => 161,
'from' => '2023-08-04 16:23:00',
'till' => '2025-06-25 15:43:37',
'created_at' => '2023-08-04 16:23:26',
'updated_at' => '2025-06-25 15:43:37',
'deleted_at' => '2025-06-25 15:43:37',
),
10 =>
array (
'id' => 25,
'post_id' => 21,
'locale' => 'en',
'slug' => 'gemany-national-news',
'title' => 'Gemany National News',
'excerpt' => '',
'content' => NULL,
'status' => 1,
'updated_by_user_id' => 161,
'from' => '2023-08-04 16:24:00',
'till' => '2025-06-25 15:43:37',
'created_at' => '2023-08-04 16:24:25',
'updated_at' => '2025-06-25 15:43:37',
'deleted_at' => '2025-06-25 15:43:37',
),
11 =>
array (
'id' => 26,
'post_id' => 22,
'locale' => 'en',
'slug' => 'sara-s-time-beyond-price',
'title' => 'Sara\'s time = beyond price !',
'excerpt' => '',
'content' => '<p><br></p>',
'status' => 1,
'updated_by_user_id' => 161,
'from' => '2025-06-25 00:00:00',
'till' => NULL,
'created_at' => '2025-06-25 12:49:47',
'updated_at' => '2025-06-26 11:49:52',
'deleted_at' => NULL,
),
12 =>
array (
'id' => 27,
'post_id' => 22,
'locale' => 'nl',
'slug' => 'sara-s-tijd-onschatbaar',
'title' => 'Sara\'s tijd = onschatbaar !',
'excerpt' => '',
'content' => '<p><br></p>',
'status' => 1,
'updated_by_user_id' => 161,
'from' => '2025-06-25 00:00:00',
'till' => NULL,
'created_at' => '2025-06-25 13:36:39',
'updated_at' => '2025-06-25 14:18:24',
'deleted_at' => NULL,
),
13 =>
array (
'id' => 28,
'post_id' => 23,
'locale' => 'en',
'slug' => 'development-enviroment-2',
'title' => 'Development enviroment',
'excerpt' => 'Do not share this web-address outside our development team. Error messages will displayed.',
'content' => '<p>Content and images are not displayed for system announcements</p>',
'status' => 1,
'updated_by_user_id' => 161,
'from' => '2025-06-27 11:36:57',
'till' => NULL,
'created_at' => '2025-06-25 14:01:42',
'updated_at' => '2025-06-27 11:36:57',
'deleted_at' => NULL,
),
14 =>
array (
'id' => 29,
'post_id' => 22,
'locale' => 'fr',
'slug' => 'le-temps-de-sara-precieux',
'title' => 'Le temps de Sara = précieux !',
'excerpt' => '',
'content' => '<p><br></p>',
'status' => 1,
'updated_by_user_id' => 161,
'from' => '2025-06-25 00:00:00',
'till' => NULL,
'created_at' => '2025-06-25 14:18:05',
'updated_at' => '2025-06-25 14:18:05',
'deleted_at' => NULL,
),
15 =>
array (
'id' => 30,
'post_id' => 22,
'locale' => 'de',
'slug' => 'saras-zeit-waehrung',
'title' => 'Saras Zeit = Währung!',
'excerpt' => '',
'content' => '<p><br></p>',
'status' => 1,
'updated_by_user_id' => 161,
'from' => '2025-06-25 00:00:00',
'till' => NULL,
'created_at' => '2025-06-25 14:20:12',
'updated_at' => '2025-06-25 14:20:12',
'deleted_at' => NULL,
),
16 =>
array (
'id' => 31,
'post_id' => 22,
'locale' => 'es',
'slug' => 'sara-tiempo-que-vale-oro-2',
'title' => '¡ Sara = tiempo que vale oro !',
'excerpt' => '',
'content' => '<p><br></p>',
'status' => 1,
'updated_by_user_id' => 161,
'from' => '2025-06-25 00:00:00',
'till' => NULL,
'created_at' => '2025-06-25 14:22:08',
'updated_at' => '2025-06-25 14:23:11',
'deleted_at' => NULL,
),
17 =>
array (
'id' => 32,
'post_id' => 24,
'locale' => 'en',
'slug' => 'timebank-cc-your-time-is-currency',
'title' => 'Timebank.cc - Your time is currency !',
'excerpt' => 'Timebank.cc is a non-profit association. Your data will never be sold or shared outside our platform.',
'content' => '<p>Join our non-profit currency where every-one\'s time is valued equally. To work, co-operate, learn, or help each other.</p>',
'status' => 1,
'updated_by_user_id' => 161,
'from' => '2025-06-25 14:26:00',
'till' => NULL,
'created_at' => '2025-06-25 14:25:59',
'updated_at' => '2025-06-26 11:33:34',
'deleted_at' => NULL,
),
18 =>
array (
'id' => 33,
'post_id' => 24,
'locale' => 'nl',
'slug' => 'timebank-cc-jouw-tijd-is-deelbaar',
'title' => 'Timebank.cc Jouw tijd is deelbaar !',
'excerpt' => 'Timebank.cc is een vereniging zonder winst doelstelling. Jouw gegevens worden nooit verkocht of gedeeld buiten ons platform.',
'content' => '<p>Sluit je aan bij onze non-profit \'munt\' waar ieders tijd evenveel waard is. Om samen te werken, te leren of elkaar te helpen.</p>',
'status' => 1,
'updated_by_user_id' => 161,
'from' => '2025-06-25 14:26:00',
'till' => NULL,
'created_at' => '2025-06-25 15:16:09',
'updated_at' => '2025-06-26 11:41:52',
'deleted_at' => NULL,
),
19 =>
array (
'id' => 34,
'post_id' => 24,
'locale' => 'fr',
'slug' => 'timebank-cc-votre-temps-est-partageable',
'title' => 'Timebank.cc Votre temps est partageable !',
'excerpt' => 'Timebank.cc est une association à but non lucratif. Vos données ne seront jamais vendues ni partagées en dehors de notre plateforme.
',
'content' => '<p>Rejoignez notre système déchange non lucratif où le temps de chacun a la même valeur. Pour travailler, coopérer, apprendre ou sentraider.</p>',
'status' => 1,
'updated_by_user_id' => 161,
'from' => '2025-06-25 14:26:00',
'till' => NULL,
'created_at' => '2025-06-25 15:17:32',
'updated_at' => '2025-06-26 12:22:39',
'deleted_at' => NULL,
),
20 =>
array (
'id' => 35,
'post_id' => 24,
'locale' => 'es',
'slug' => 'timebank-cc-tu-tiempo-es-compartible',
'title' => 'Timebank.cc ¡Tu tiempo es compartible!',
'excerpt' => 'Timebank.cc es una asociación sin ánimo de lucro. Tus datos nunca se venderán ni compartirán fuera de nuestra plataforma.',
'content' => '<p>Únete a nuestro sistema sin fines de lucro donde el tiempo de todos se valora por igual. Para trabajar, cooperar, aprender o ayudarnos mutuamente.</p>',
'status' => 1,
'updated_by_user_id' => 161,
'from' => '2025-06-25 14:26:00',
'till' => NULL,
'created_at' => '2025-06-25 15:18:27',
'updated_at' => '2025-06-26 12:22:24',
'deleted_at' => NULL,
),
21 =>
array (
'id' => 36,
'post_id' => 24,
'locale' => 'de',
'slug' => 'timebank-cc-deine-zeit-ist-teilbar',
'title' => 'Timebank.cc Deine Zeit ist teilbar!',
'excerpt' => 'Timebank.cc ist ein gemeinnütziger Verein. Deine Daten werden niemals verkauft oder außerhalb unserer Plattform geteilt.',
'content' => '<p>Schließe dich unserer gemeinnützigen "Währung" an, in der jede Zeit gleich viel wert ist. Zum Arbeiten, Zusammenarbeiten, Lernen oder gegenseitigem Helfen.</p>',
'status' => 1,
'updated_by_user_id' => 161,
'from' => '2025-06-25 14:26:00',
'till' => NULL,
'created_at' => '2025-06-25 15:19:27',
'updated_at' => '2025-06-26 12:21:56',
'deleted_at' => NULL,
),
22 =>
array (
'id' => 37,
'post_id' => 25,
'locale' => 'en',
'slug' => 'your-time-lekkernassuh-s-time-our-time',
'title' => 'Your time = Lekkernassûh\'s time = our time !',
'excerpt' => '',
'content' => NULL,
'status' => 1,
'updated_by_user_id' => 161,
'from' => '2025-06-26 11:57:00',
'till' => NULL,
'created_at' => '2025-06-26 11:57:05',
'updated_at' => '2025-06-26 11:59:26',
'deleted_at' => NULL,
),
23 =>
array (
'id' => 38,
'post_id' => 25,
'locale' => 'nl',
'slug' => 'jouw-tijd-lekkernassuh-s-tijd-onze-tijd',
'title' => 'Jouw tijd = Lekkernassûh\'s tijd = onze tijd!',
'excerpt' => '',
'content' => NULL,
'status' => 1,
'updated_by_user_id' => 161,
'from' => '2025-06-26 11:57:00',
'till' => NULL,
'created_at' => '2025-06-26 12:01:09',
'updated_at' => '2025-06-26 12:01:09',
'deleted_at' => NULL,
),
24 =>
array (
'id' => 39,
'post_id' => 25,
'locale' => 'fr',
'slug' => 'votre-temps-le-temps-de-lekkernassuh-notre-temps',
'title' => 'Votre temps = Le temps de Lekkernassûh = notre temps !',
'excerpt' => '',
'content' => NULL,
'status' => 1,
'updated_by_user_id' => 161,
'from' => '2025-06-26 11:57:00',
'till' => NULL,
'created_at' => '2025-06-26 12:01:39',
'updated_at' => '2025-06-26 12:01:39',
'deleted_at' => NULL,
),
25 =>
array (
'id' => 40,
'post_id' => 25,
'locale' => 'es',
'slug' => 'tu-tiempo-el-tiempo-de-lekkernassuh-nuestro-tiempo',
'title' => 'Tu tiempo = el tiempo de Lekkernassûh = ¡nuestro tiempo!',
'excerpt' => '',
'content' => NULL,
'status' => 1,
'updated_by_user_id' => 161,
'from' => '2025-06-26 11:57:00',
'till' => NULL,
'created_at' => '2025-06-26 12:02:05',
'updated_at' => '2025-06-26 12:02:05',
'deleted_at' => NULL,
),
26 =>
array (
'id' => 41,
'post_id' => 25,
'locale' => 'de',
'slug' => 'deine-zeit-lekkernassuhs-zeit-unsere-zeit',
'title' => 'Deine Zeit = Lekkernassûhs Zeit = unsere Zeit!',
'excerpt' => '',
'content' => NULL,
'status' => 1,
'updated_by_user_id' => 161,
'from' => '2025-06-26 11:57:00',
'till' => NULL,
'created_at' => '2025-06-26 12:02:33',
'updated_at' => '2025-06-26 12:02:33',
'deleted_at' => NULL,
),
27 =>
array (
'id' => 42,
'post_id' => 26,
'locale' => 'en',
'slug' => 'joeri-s-time-gonzalo-s-time-beppe-s-time',
'title' => 'Joeri\'s time = Gonzalo\'s time = Beppe\'s time !',
'excerpt' => '',
'content' => NULL,
'status' => 1,
'updated_by_user_id' => 161,
'from' => '2025-06-26 12:18:56',
'till' => NULL,
'created_at' => '2025-06-26 12:13:14',
'updated_at' => '2025-06-26 12:18:56',
'deleted_at' => NULL,
),
28 =>
array (
'id' => 43,
'post_id' => 26,
'locale' => 'nl',
'slug' => 'joeri-s-tijd-gonzalo-s-tijd-beppe-s-tijd',
'title' => 'Joeri\'s tijd = Gonzalo\'s tijd = Beppe\'s tijd!',
'excerpt' => '',
'content' => NULL,
'status' => 1,
'updated_by_user_id' => 161,
'from' => '2025-06-26 12:19:00',
'till' => NULL,
'created_at' => '2025-06-26 12:17:37',
'updated_at' => '2025-06-26 12:19:00',
'deleted_at' => NULL,
),
29 =>
array (
'id' => 44,
'post_id' => 26,
'locale' => 'fr',
'slug' => 'le-temps-de-joeri-le-temps-de-gonzalo-le-temps-de-beppe',
'title' => 'Le temps de Joeri = le temps de Gonzalo = le temps de Beppe !',
'excerpt' => '',
'content' => NULL,
'status' => 1,
'updated_by_user_id' => 161,
'from' => '2025-06-26 12:19:05',
'till' => NULL,
'created_at' => '2025-06-26 12:17:57',
'updated_at' => '2025-06-26 12:19:05',
'deleted_at' => NULL,
),
30 =>
array (
'id' => 45,
'post_id' => 26,
'locale' => 'es',
'slug' => 'el-tiempo-de-joeri-el-tiempo-de-gonzalo-el-tiempo-de-beppe',
'title' => '¡El tiempo de Joeri = el tiempo de Gonzalo = el tiempo de Beppe!',
'excerpt' => '',
'content' => NULL,
'status' => 1,
'updated_by_user_id' => 161,
'from' => '2025-06-26 12:19:08',
'till' => NULL,
'created_at' => '2025-06-26 12:18:31',
'updated_at' => '2025-06-26 12:19:08',
'deleted_at' => NULL,
),
31 =>
array (
'id' => 46,
'post_id' => 26,
'locale' => 'de',
'slug' => 'joeris-zeit-gonzalos-zeit-beppes-zeit',
'title' => 'Joeris Zeit = Gonzalos Zeit = Beppes Zeit!',
'excerpt' => '',
'content' => NULL,
'status' => 1,
'updated_by_user_id' => 161,
'from' => '2025-06-26 12:19:12',
'till' => NULL,
'created_at' => '2025-06-26 12:18:50',
'updated_at' => '2025-06-26 12:19:12',
'deleted_at' => NULL,
),
32 =>
array (
'id' => 47,
'post_id' => 23,
'locale' => 'nl',
'slug' => 'ontwikkel-omgeving',
'title' => 'Ontwikkel omgeving',
'excerpt' => 'Deel dit web-adres nooit buiten het onwikkel team. Foutmeldingen worden getoond.',
'content' => '<p>Content and images are not displayed for system announcements</p>',
'status' => 1,
'updated_by_user_id' => 161,
'from' => '2025-06-27 11:36:16',
'till' => NULL,
'created_at' => '2025-06-27 09:50:51',
'updated_at' => '2025-06-27 11:36:16',
'deleted_at' => NULL,
),
33 =>
array (
'id' => 48,
'post_id' => 27,
'locale' => 'nl',
'slug' => 'hoe-te-starten',
'title' => 'Hoe te starten',
'excerpt' => 'Lorem ipsum dolor sit amet consectetur adipiscing elit. Quisque faucibus ex sapien vitae pellentesque sem placerat. In id cursus mi pretium tellus duis convallis. ',
'content' => '<p>Lorem ipsum dolor sit amet consectetur adipiscing elit. Quisque faucibus ex sapien vitae pellentesque sem placerat. In id cursus mi pretium tellus duis convallis. Tempus leo eu aenean sed diam urna tempor. Pulvinar vivamus fringilla lacus nec metus bibendum egestas. Iaculis massa nisl malesuada lacinia integer nunc posuere. Ut hendrerit semper vel class aptent taciti sociosqu. Ad litora torquent per conubia nostra inceptos himenaeos.</p><p><br></p><p>Lorem ipsum dolor sit amet consectetur adipiscing elit. Quisque faucibus ex sapien vitae pellentesque sem placerat. In id cursus mi pretium tellus duis convallis. Tempus leo eu aenean sed diam urna tempor. Pulvinar vivamus fringilla lacus nec metus bibendum egestas. Iaculis massa nisl malesuada lacinia integer nunc posuere. Ut hendrerit semper vel class aptent taciti sociosqu. Ad litora torquent per conubia nostra inceptos himenaeos.</p><p><br></p><p>Lorem ipsum dolor sit amet consectetur adipiscing elit. Quisque faucibus ex sapien vitae pellentesque sem placerat. In id cursus mi pretium tellus duis convallis. Tempus leo eu aenean sed diam urna tempor. Pulvinar vivamus fringilla lacus nec metus bibendum egestas. Iaculis massa nisl malesuada lacinia integer nunc posuere. Ut hendrerit semper vel class aptent taciti sociosqu. Ad litora torquent per conubia nostra inceptos himenaeos.</p>',
'status' => 1,
'updated_by_user_id' => 161,
'from' => '2025-06-27 10:20:49',
'till' => NULL,
'created_at' => '2025-06-27 10:20:42',
'updated_at' => '2025-06-27 10:20:49',
'deleted_at' => NULL,
),
34 =>
array (
'id' => 49,
'post_id' => 27,
'locale' => 'en',
'slug' => 'getting-started',
'title' => 'Getting started',
'excerpt' => 'Lorem ipsum dolor sit amet consectetur adipiscing elit. Quisque faucibus ex sapien vitae pellentesque sem placerat. In id cursus mi pretium tellus duis convallis. ',
'content' => '<p>Lorem ipsum dolor sit amet consectetur adipiscing elit. Quisque faucibus ex sapien vitae pellentesque sem placerat. In id cursus mi pretium tellus duis convallis. Tempus leo eu aenean sed diam urna tempor. Pulvinar vivamus fringilla lacus nec metus bibendum egestas. Iaculis massa nisl malesuada lacinia integer nunc posuere. Ut hendrerit semper vel class aptent taciti sociosqu. Ad litora torquent per conubia nostra inceptos himenaeos.</p><p><br></p><p>Lorem ipsum dolor sit amet consectetur adipiscing elit. Quisque faucibus ex sapien vitae pellentesque sem placerat. In id cursus mi pretium tellus duis convallis. Tempus leo eu aenean sed diam urna tempor. Pulvinar vivamus fringilla lacus nec metus bibendum egestas. Iaculis massa nisl malesuada lacinia integer nunc posuere. Ut hendrerit semper vel class aptent taciti sociosqu. Ad litora torquent per conubia nostra inceptos himenaeos.</p><p><br></p><p>Lorem ipsum dolor sit amet consectetur adipiscing elit. Quisque faucibus ex sapien vitae pellentesque sem placerat. In id cursus mi pretium tellus duis convallis. Tempus leo eu aenean sed diam urna tempor. Pulvinar vivamus fringilla lacus nec metus bibendum egestas. Iaculis massa nisl malesuada lacinia integer nunc posuere. Ut hendrerit semper vel class aptent taciti sociosqu. Ad litora torquent per conubia nostra inceptos himenaeos.</p>',
'status' => 1,
'updated_by_user_id' => 161,
'from' => '2025-06-27 10:20:00',
'till' => NULL,
'created_at' => '2025-06-27 10:23:13',
'updated_at' => '2025-06-27 10:23:13',
'deleted_at' => NULL,
),
35 =>
array (
'id' => 50,
'post_id' => 28,
'locale' => 'nl',
'slug' => 'veel-gestelde-vragen',
'title' => 'Veel gestelde vragen',
'excerpt' => 'Tempus leo eu aenean sed diam urna tempor. Pulvinar vivamus fringilla lacus nec metus bibendum egestas. Iaculis massa nisl malesuada lacinia integer nunc posuere. Ut hendrerit semper vel class aptent taciti sociosqu. Ad litora torquent per conubia nostra inceptos himenaeos.',
'content' => '<ol><li data-list="bullet"><span class="ql-ui" contenteditable="false"></span>Lorem ipsum dolor sit amet consectetur adipiscing elit. Quisque faucibus ex sapien vitae pellentesque sem placerat. In id cursus mi pretium tellus duis convallis. Tempus leo eu aenean sed diam urna tempor. Pulvinar vivamus fringilla lacus nec metus bibendum egestas. Iaculis massa nisl malesuada lacinia integer nunc posuere. Ut hendrerit semper vel class aptent taciti sociosqu. Ad litora torquent per conubia nostra inceptos himenaeos.</li></ol><p><br></p><ol><li data-list="bullet"><span class="ql-ui" contenteditable="false"></span>Lorem ipsum dolor sit amet consectetur adipiscing elit. Quisque faucibus ex sapien vitae pellentesque sem placerat. In id cursus mi pretium tellus duis convallis. Tempus leo eu aenean sed diam urna tempor. Pulvinar vivamus fringilla lacus nec metus bibendum egestas. Iaculis massa nisl malesuada lacinia integer nunc posuere. Ut hendrerit semper vel class aptent taciti sociosqu. Ad litora torquent per conubia nostra inceptos himenaeos.</li></ol><p><br></p><ol><li data-list="bullet"><span class="ql-ui" contenteditable="false"></span>Lorem ipsum dolor sit amet consectetur adipiscing elit. Quisque faucibus ex sapien vitae pellentesque sem placerat. In id cursus mi pretium tellus duis convallis. Tempus leo eu aenean sed diam urna tempor. Pulvinar vivamus fringilla lacus nec metus bibendum egestas. Iaculis massa nisl malesuada lacinia integer nunc posuere. Ut hendrerit semper vel class aptent taciti sociosqu. Ad litora torquent per conubia nostra inceptos himenaeos.</li></ol><p><br></p><ol><li data-list="bullet"><span class="ql-ui" contenteditable="false"></span>Lorem ipsum dolor sit amet consectetur adipiscing elit. Quisque faucibus ex sapien vitae pellentesque sem placerat. In id cursus mi pretium tellus duis convallis. Tempus leo eu aenean sed diam urna tempor. Pulvinar vivamus fringilla lacus nec metus bibendum egestas. Iaculis massa nisl malesuada lacinia integer nunc posuere. Ut hendrerit semper vel class aptent taciti sociosqu. Ad litora torquent per conubia nostra inceptos himenaeos.</li></ol><p><br></p><ol><li data-list="bullet"><span class="ql-ui" contenteditable="false"></span>Lorem ipsum dolor sit amet consectetur adipiscing elit. Quisque faucibus ex sapien vitae pellentesque sem placerat. In id cursus mi pretium tellus duis convallis. Tempus leo eu aenean sed diam urna tempor. Pulvinar vivamus fringilla lacus nec metus bibendum egestas. Iaculis massa nisl malesuada lacinia integer nunc posuere. Ut hendrerit semper vel class aptent taciti sociosqu. Ad litora torquent per conubia nostra inceptos himenaeos.</li></ol>',
'status' => 1,
'updated_by_user_id' => 161,
'from' => '2025-06-27 10:29:18',
'till' => NULL,
'created_at' => '2025-06-27 10:29:12',
'updated_at' => '2025-06-27 10:29:18',
'deleted_at' => NULL,
),
36 =>
array (
'id' => 51,
'post_id' => 29,
'locale' => 'en',
'slug' => 'old-system-announcement',
'title' => 'Old system announcement',
'excerpt' => 'This is an example of an old system annoouncement. It should not be displayed when another, newer, announcement is published.',
'content' => NULL,
'status' => 1,
'updated_by_user_id' => 161,
'from' => '2025-06-01 11:14:00',
'till' => NULL,
'created_at' => '2025-06-01 14:22:00',
'updated_at' => '2025-06-01 12:33:21',
'deleted_at' => NULL,
),
37 =>
array (
'id' => 52,
'post_id' => 30,
'locale' => 'nl',
'slug' => 'nrc-next-uren-sprokkelen-ipv-euro-s',
'title' => 'NRC Next: Uren sprokkelen ipv euro\'s',
'excerpt' => '24 december 2014',
'content' => NULL,
'status' => 1,
'updated_by_user_id' => 161,
'from' => '2025-06-27 12:43:05',
'till' => NULL,
'created_at' => '2025-06-27 12:42:54',
'updated_at' => '2025-06-27 12:43:05',
'deleted_at' => NULL,
),
38 =>
array (
'id' => 53,
'post_id' => 31,
'locale' => 'nl',
'slug' => 'rodi-nl-bij-de-time-bank-in-den-haag-spaar-je-uren-in-plaats-van-euro-s',
'title' => 'Rodi.nl: Bij de Time Bank in Den Haag spaar je uren in plaats van euros',
'excerpt' => '15 augustsus 2018',
'content' => '<p><br></p><p>Een bank zonder geld: dat kan toch niet? Toch wel. Bij de Time Bank in Den Haag spaar je geen euros maar uren. Daarmee kun je diensten kopen. Je helpt iemand een uur lang in de tuin en in ruil daarvoor kun je bij een ander een uur Franse les krijgen...</p><p><br></p><p>Lees het volledige artikel hier:</p><p><a href="https://www.rodi.nl/denhaag/251918/bij-de-time-bank-in-den-haag-spaar-je-uren-in-plaats-van-euro-s" rel="noopener noreferrer" target="_blank">Bij de Time Bank in Den Haag spaar je uren in plaats van euros</a></p>',
'status' => 1,
'updated_by_user_id' => 161,
'from' => '2025-06-27 13:01:00',
'till' => NULL,
'created_at' => '2025-06-27 13:01:41',
'updated_at' => '2025-06-27 13:42:25',
'deleted_at' => NULL,
),
39 =>
array (
'id' => 54,
'post_id' => 32,
'locale' => 'en',
'slug' => 'hello',
'title' => 'Hello',
'excerpt' => 'Timebank.cc is an association based in The Hague',
'content' => '<p><strong>General information</strong></p><p><a href="mailto:info@timebank.cc" rel="noopener noreferrer" target="_blank">info@timebank.cc</a></p><h4><br></h4><p><strong>Bank administration</strong></p><p><a href="mailto:admin@timebank.cc" rel="noopener noreferrer" target="_blank">admin@timebank.cc</a></p><h4><br></h4><p><br></p><p>Sara Pape Garcia Chairperson</p><p><a href="mailto:sara.pape@timebank.cc" rel="noopener noreferrer" target="_blank">sara.pape@timebank.cc</a></p><p><br></p><p>Joeri Oudshoorn Secretary</p><p><a href="mailto:joeri.oudshoorn@timebank.cc" rel="noopener noreferrer" target="_blank">joeri.oudshoorn@timebank.cc</a></p><p><br></p><p>Ronald Huynen Treasurer</p><p><a href="mailto:ronald.huynen@timebank.cc" rel="noopener noreferrer" target="_blank">ronald.huynen@timebank.cc</a></p><p><br></p><p><strong>Official post address association</strong></p><p>Zoutkeetsingel 77</p><p>2515HN Den Haag</p><p>The Netherlands</p>',
'status' => 1,
'updated_by_user_id' => 161,
'from' => '2025-06-27 15:20:00',
'till' => NULL,
'created_at' => '2025-06-27 15:19:57',
'updated_at' => '2025-06-27 15:30:39',
'deleted_at' => NULL,
),
40 =>
array (
'id' => 55,
'post_id' => 33,
'locale' => 'en',
'slug' => 'event-calendar',
'title' => 'Event calendar',
'excerpt' => 'All planned upcoming events and activities are listed here.',
'content' => NULL,
'status' => 1,
'updated_by_user_id' => 161,
'from' => '2025-06-27 15:46:00',
'till' => NULL,
'created_at' => '2025-06-27 15:46:04',
'updated_at' => '2025-06-27 15:49:03',
'deleted_at' => NULL,
),
41 =>
array (
'id' => 56,
'post_id' => 33,
'locale' => 'nl',
'slug' => 'evenementen-agenda',
'title' => 'Evenementen agenda',
'excerpt' => 'Alle onze geplande evenementen en activiteiten kun je hier vinden.',
'content' => NULL,
'status' => 1,
'updated_by_user_id' => 161,
'from' => '2025-06-27 15:46:00',
'till' => NULL,
'created_at' => '2025-06-27 15:50:48',
'updated_at' => '2025-06-27 15:50:48',
'deleted_at' => NULL,
),
));
}
}

View File

@@ -0,0 +1,236 @@
<?php
namespace Database\Seeders;
use Illuminate\Database\Seeder;
class PostsTableSeeder extends Seeder
{
/**
* Auto generated seed file
*
* @return void
*/
public function run()
{
\DB::table('posts')->delete();
\DB::table('posts')->insert(array (
0 =>
array (
'id' => 13,
'postable_id' => 1,
'postable_type' => 'App\\Models\\Admin',
'category_id' => 4,
'created_at' => '2023-07-29 21:44:43',
'updated_at' => '2025-06-25 15:04:55',
'deleted_at' => NULL,
),
1 =>
array (
'id' => 14,
'postable_id' => 1,
'postable_type' => 'App\\Models\\User',
'category_id' => 4,
'created_at' => '2023-07-29 21:49:40',
'updated_at' => '2023-07-29 21:49:40',
'deleted_at' => NULL,
),
2 =>
array (
'id' => 15,
'postable_id' => 1,
'postable_type' => 'App\\Models\\User',
'category_id' => 4,
'created_at' => '2023-07-29 22:30:08',
'updated_at' => '2025-06-25 15:43:04',
'deleted_at' => '2025-06-25 15:43:04',
),
3 =>
array (
'id' => 16,
'postable_id' => 1,
'postable_type' => 'App\\Models\\User',
'category_id' => 2,
'created_at' => '2023-07-29 23:00:21',
'updated_at' => '2025-06-25 15:42:33',
'deleted_at' => '2025-06-25 15:42:33',
),
4 =>
array (
'id' => 17,
'postable_id' => 1,
'postable_type' => 'App\\Models\\User',
'category_id' => 2,
'created_at' => '2023-07-29 23:00:53',
'updated_at' => '2025-06-25 15:42:33',
'deleted_at' => '2025-06-25 15:42:33',
),
5 =>
array (
'id' => 18,
'postable_id' => 1,
'postable_type' => 'App\\Models\\User',
'category_id' => 5,
'created_at' => '2023-08-04 14:09:47',
'updated_at' => '2025-06-25 15:43:56',
'deleted_at' => '2025-06-25 15:43:56',
),
6 =>
array (
'id' => 19,
'postable_id' => 1,
'postable_type' => 'App\\Models\\User',
'category_id' => 6,
'created_at' => '2023-08-04 14:42:31',
'updated_at' => '2025-06-25 15:43:56',
'deleted_at' => '2025-06-25 15:43:56',
),
7 =>
array (
'id' => 20,
'postable_id' => 1,
'postable_type' => 'App\\Models\\User',
'category_id' => 7,
'created_at' => '2023-08-04 16:23:26',
'updated_at' => '2025-06-25 15:43:37',
'deleted_at' => '2025-06-25 15:43:37',
),
8 =>
array (
'id' => 21,
'postable_id' => 1,
'postable_type' => 'App\\Models\\User',
'category_id' => 2,
'created_at' => '2023-08-04 16:24:25',
'updated_at' => '2025-06-25 15:43:37',
'deleted_at' => '2025-06-25 15:43:37',
),
9 =>
array (
'id' => 22,
'postable_id' => 1,
'postable_type' => 'App\\Models\\Admin',
'category_id' => 1,
'created_at' => '2025-06-25 12:49:47',
'updated_at' => '2025-06-25 13:13:25',
'deleted_at' => NULL,
),
10 =>
array (
'id' => 23,
'postable_id' => 1,
'postable_type' => 'App\\Models\\Admin',
'category_id' => 3,
'created_at' => '2025-06-25 14:01:42',
'updated_at' => '2025-06-26 15:18:34',
'deleted_at' => NULL,
),
11 =>
array (
'id' => 24,
'postable_id' => 1,
'postable_type' => 'App\\Models\\Admin',
'category_id' => 2,
'created_at' => '2025-06-25 14:25:59',
'updated_at' => '2025-06-25 14:36:11',
'deleted_at' => NULL,
),
12 =>
array (
'id' => 25,
'postable_id' => 1,
'postable_type' => 'App\\Models\\Admin',
'category_id' => 1,
'created_at' => '2025-06-26 11:57:05',
'updated_at' => '2025-06-26 11:59:26',
'deleted_at' => NULL,
),
13 =>
array (
'id' => 26,
'postable_id' => 1,
'postable_type' => 'App\\Models\\Admin',
'category_id' => 1,
'created_at' => '2025-06-26 12:13:14',
'updated_at' => '2025-06-26 12:14:54',
'deleted_at' => NULL,
),
14 =>
array (
'id' => 27,
'postable_id' => 161,
'postable_type' => 'App\\Models\\User',
'category_id' => 89,
'created_at' => '2025-06-27 10:20:42',
'updated_at' => '2025-06-27 10:20:42',
'deleted_at' => NULL,
),
15 =>
array (
'id' => 28,
'postable_id' => 161,
'postable_type' => 'App\\Models\\User',
'category_id' => 90,
'created_at' => '2025-06-27 10:29:12',
'updated_at' => '2025-06-27 10:29:12',
'deleted_at' => NULL,
),
16 =>
array (
'id' => 29,
'postable_id' => 1,
'postable_type' => 'App\\Models\\Admin',
'category_id' => 3,
'created_at' => '2025-06-27 11:14:22',
'updated_at' => '2025-06-27 11:23:32',
'deleted_at' => NULL,
),
17 =>
array (
'id' => 30,
'postable_id' => 161,
'postable_type' => 'App\\Models\\User',
'category_id' => 100,
'created_at' => '2025-06-27 12:42:54',
'updated_at' => '2025-06-27 12:42:54',
'deleted_at' => NULL,
),
18 =>
array (
'id' => 31,
'postable_id' => 1,
'postable_type' => 'App\\Models\\Admin',
'category_id' => 100,
'created_at' => '2025-06-27 13:01:41',
'updated_at' => '2025-06-27 13:40:52',
'deleted_at' => NULL,
),
19 =>
array (
'id' => 32,
'postable_id' => 1,
'postable_type' => 'App\\Models\\Admin',
'category_id' => 102,
'created_at' => '2025-06-27 15:19:57',
'updated_at' => '2025-06-27 15:23:26',
'deleted_at' => NULL,
),
20 =>
array (
'id' => 33,
'postable_id' => 1,
'postable_type' => 'App\\Models\\Admin',
'category_id' => 104,
'created_at' => '2025-06-27 15:46:03',
'updated_at' => '2025-06-27 15:47:42',
'deleted_at' => NULL,
),
));
}
}

View File

@@ -0,0 +1,156 @@
<?php
namespace Database\Seeders;
use Illuminate\Database\Seeder;
class SocialsTableSeeder extends Seeder
{
/**
* Auto generated seed file
*
* @return void
*/
public function run()
{
\DB::table('socials')->delete();
\DB::table('socials')->insert(array (
0 =>
array (
'id' => 1,
'name' => 'Facebook',
'icon' => 'app-images/facebook.svg',
'url_structure' => 'https://facebook.com/',
'created_at' => NULL,
'updated_at' => NULL,
'deleted_at' => NULL,
),
1 =>
array (
'id' => 2,
'name' => 'Instagram',
'icon' => 'app-images/instagram.svg',
'url_structure' => 'https://instagram.com/',
'created_at' => NULL,
'updated_at' => NULL,
'deleted_at' => NULL,
),
2 =>
array (
'id' => 3,
'name' => 'Bluesky',
'icon' => 'app-images/bluesky.svg',
'url_structure' => 'https://bsky.app/profile/',
'created_at' => NULL,
'updated_at' => NULL,
'deleted_at' => NULL,
),
3 =>
array (
'id' => 4,
'name' => 'Mastodon',
'icon' => 'app-images/mastodon.svg',
'url_structure' => 'https://#/@',
'created_at' => NULL,
'updated_at' => NULL,
'deleted_at' => NULL,
),
4 =>
array (
'id' => 5,
'name' => 'LinkedIn',
'icon' => 'app-images/linkedin.svg',
'url_structure' => 'https://linkedin.com/in/',
'created_at' => NULL,
'updated_at' => NULL,
'deleted_at' => NULL,
),
5 =>
array (
'id' => 6,
'name' => 'YouTube',
'icon' => 'app-images/youtube.svg',
'url_structure' => 'https://youtube.com/@',
'created_at' => NULL,
'updated_at' => NULL,
'deleted_at' => NULL,
),
6 =>
array (
'id' => 7,
'name' => 'WhatsApp',
'icon' => 'app-images/whatsapp.svg',
'url_structure' => 'https://api.whatsapp.com/send?phone=',
'created_at' => NULL,
'updated_at' => NULL,
'deleted_at' => NULL,
),
7 =>
array (
'id' => 8,
'name' => 'Vimeo',
'icon' => 'app-images/vimeo.svg',
'url_structure' => 'https://vimeo.com/',
'created_at' => NULL,
'updated_at' => NULL,
'deleted_at' => NULL,
),
8 =>
array (
'id' => 9,
'name' => 'Github',
'icon' => 'app-images/github.svg',
'url_structure' => 'https://github.com/',
'created_at' => NULL,
'updated_at' => NULL,
'deleted_at' => NULL,
),
9 =>
array (
'id' => 10,
'name' => 'Snappcar',
'icon' => 'app-images/snappcar.svg',
'url_structure' => '',
'created_at' => NULL,
'updated_at' => NULL,
'deleted_at' => NULL,
),
10 =>
array (
'id' => 11,
'name' => 'Peerby',
'icon' => 'app-images/peerby.svg',
'url_structure' => '',
'created_at' => NULL,
'updated_at' => NULL,
'deleted_at' => NULL,
),
11 =>
array (
'id' => 12,
'name' => 'Telegram',
'icon' => 'app-images/telegram.svg',
'url_structure' => 'https://t.me/',
'created_at' => NULL,
'updated_at' => NULL,
'deleted_at' => NULL,
),
12 =>
array (
'id' => 13,
'name' => 'Flickr',
'icon' => 'app-images/flickr.svg',
'url_structure' => 'https://flickr.com/',
'created_at' => NULL,
'updated_at' => NULL,
'deleted_at' => NULL,
),
));
}
}

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,139 @@
<?php
namespace Database\Seeders;
use App\Models\Account;
use App\Models\Locations\Location;
use App\Models\Organization;
use App\Models\User;
use Illuminate\Database\Seeder;
use Illuminate\Support\Carbon;
use Illuminate\Support\Facades\DB;
class TestProfileSeeder extends Seeder
{
/**
* Run the database seeds.
*
* @return void
*/
public function run()
{
$user1 = User::factory()
->has(Account::factory()->state(['name' => 'Personal Account']))
->has(Location::factory()->state(['city_id' => 305, 'division_id' => 12, 'country_id' => 1]))
->create([
'name' => 'Ronald',
'full_name' => 'Ronald',
'email' => 'ronald@test.nl',
'email_verified_at' => Carbon::now(),
'profile_photo_path' => timebank_config('profiles.user.profile_photo_path_default'),
'password' => bcrypt(timebank_config('init_passwords.test-profile')),
]);
$this->command->info('Ronald email and password: ronald@test.nl, ' . timebank_config('init_passwords.test-profile'));
$user2 = User::factory()
->has(Account::factory()->state(['name' => 'Personal Account']))
->has(Location::factory()->state(['city_id' => 345, 'country_id' => 2]))
->create([
'name' => 'Joeri',
'full_name' => 'Joeri',
'email' => 'joeri@test.nl',
'email_verified_at' => Carbon::now(),
'profile_photo_path' => timebank_config('profiles.user.profile_photo_path_default'),
'password' => bcrypt(timebank_config('init_passwords.test-profile')),
]);
$this->command->info('Joeri email and password: joeri@test.nl, ' . timebank_config('init_passwords.test-profile'));
$user3 = User::factory()
->has(Account::factory()->state(['name' => 'Personal Account']))
->has(Location::factory()->state(['city_id' => 330, 'division_id' => 12, 'country_id' => 1]))
->create([
'name' => 'Sara',
'full_name' => 'Sara',
'email' => 'sara@test.nl',
'email_verified_at' => Carbon::now(),
'profile_photo_path' => timebank_config('profiles.user.profile_photo_path_default'),
'password' => bcrypt(timebank_config('init_passwords.test-profile')),
]);
$this->command->info('Sara email and password: sara@test.nl, '. timebank_config('init_passwords.test-profile'));
$org1 = Organization::factory()
->has(Account::factory()->state(['name' => 'General Account'])->state(
['name' => 'Currency Creation',
'limit_min' => -12000
]
))
->has(Account::factory()->state(
['name' => 'General']
))
->has(Location::factory()->state(['city_id' => 305, 'division_id' => 12, 'country_id' => 1]))
->create([
'name' => 'Test Organization',
'full_name' => 'Test Organization The Hague',
'email' => 'test-organizationg@test.nl',
'email_verified_at' => Carbon::now(),
'profile_photo_path' => timebank_config('profiles.organization.profile_photo_path_default'),
'password' => bcrypt(timebank_config('init_passwords.test-profile')),
]);
$this->command->info('Test Organization email and password: test-organization@test.nl, ' . timebank_config('init_passwords.test-profile'));
$org2 = Organization::factory()
->has(Account::factory()->state(
['name' => 'Algemeen']
))
->has(Account::factory()->state(
['name' => 'Gymzaal']
))
->has(Account::factory()->state(
['name' => 'Wonnebald']
))
->has(Account::factory()->state(
['name' => 'Spinozahof']
))
->has(Account::factory()->state(
['name' => 'Mozartlaan']
))
->has(Location::factory()->state(['city_id' => 305, 'division_id' => 12, 'country_id' => 1]))
->create([
'name' => 'Lekkernassuh',
'full_name' => 'Lekkernassuh groentemarkt',
'email' => 'lekkernassuh@test.nl',
'email_verified_at' => Carbon::now(),
'profile_photo_path' => timebank_config('profiles.organization.profile_photo_path_default'),
'password' => bcrypt(timebank_config('init_passwords.test-profile')),
]);
DB::table('organization_user')->insert([
'organization_id' => $org1->id,
'user_id' => $user1->id]);
DB::table('organization_user')->insert([
'organization_id' => $org1->id,
'user_id' => $user2->id]);
DB::table('organization_user')->insert([
'organization_id' => $org2->id,
'user_id' => $user1->id]);
DB::table('organization_user')->insert([
'organization_id' => $org2->id,
'user_id' => $user2->id]);
DB::table('organization_user')->insert([
'organization_id' => $org2->id,
'user_id' => $user3->id]);
$this->command->info('Lekkernassuh email and password: lekkernassuh@test.nl, ' . timebank_config('init_passwords.test-profile'));
$this->command->info('The test profiles are seeded');
}
}

View File

@@ -0,0 +1,246 @@
<?php
namespace Database\Seeders;
use App\Models\Call;
use App\Models\CallTranslation;
use App\Models\Locations\Location;
use App\Models\User;
use Illuminate\Database\Seeder;
use Illuminate\Support\Facades\DB;
/**
* Temporary seeder for search testing only. NOT for production.
* Assigns random tags and calls to users that don't have them.
*
* Run: php artisan db:seed --class=TestSearchDataSeeder
* Undo: php artisan db:seed --class=TestSearchDataSeeder --rollback
* (or pass --rollback flag)
*/
class TestSearchDataSeeder extends Seeder
{
// How many users to seed (pick randomly from those without tags/calls)
private const USERS_TO_SEED = 200;
private const TAGS_PER_USER = 3;
private const CALLS_PER_USER = 2;
public function run(bool $rollback = false): void
{
if ($rollback || in_array('--rollback', $_SERVER['argv'] ?? [])) {
$this->rollback();
return;
}
$this->seedTags();
$this->seedCalls();
$this->command->info('Re-indexing affected users in Elasticsearch (synchronously)...');
$this->reindexAffectedUsers();
$this->command->info('Done. Run with --rollback to remove test data.');
}
private function seedTags(): void
{
$users = User::doesntHave('tags')
->inRandomOrder()
->limit(self::USERS_TO_SEED)
->get();
// Only use tag_ids that have a context with a non-null category_id
$tagIds = DB::table('taggable_contexts')
->whereNotNull('category_id')
->inRandomOrder()->limit(500)->pluck('id')->toArray();
if (empty($tagIds)) {
$this->command->warn('No tags found, skipping tag seeding.');
return;
}
$rows = [];
$now = now()->toDateTimeString();
foreach ($users as $user) {
$selected = collect($tagIds)->shuffle()->take(self::TAGS_PER_USER);
foreach ($selected as $tagId) {
$rows[] = [
'tag_id' => $tagId,
'taggable_id' => $user->id,
'taggable_type' => 'App\Models\User',
'created_at' => $now,
'updated_at' => $now,
];
}
}
// Insert in chunks, ignore duplicates
foreach (array_chunk($rows, 500) as $chunk) {
DB::table('taggable_taggables')->insertOrIgnore($chunk);
}
$this->command->info('Seeded tags for ' . $users->count() . ' users.');
}
private function seedCalls(): void
{
$users = User::with(['locations.country', 'locations.division', 'locations.city', 'locations.district'])
->inRandomOrder()
->limit(self::USERS_TO_SEED)
->get();
// Only use tag_ids that exist in taggable_tags AND have a context with a non-null category_id
$validTagIds = DB::table('taggable_tags')
->whereIn('tag_id', DB::table('taggable_contexts')->whereNotNull('category_id')->pluck('id'))
->inRandomOrder()->limit(100)->pluck('tag_id')->toArray();
if (empty($validTagIds)) {
$this->command->warn('No valid tags found, skipping call seeding.');
return;
}
// Fetch tag names for generating content
$tagNames = DB::table('taggable_tags')
->whereIn('tag_id', $validTagIds)
->pluck('name', 'tag_id');
$count = 0;
$now = now();
foreach ($users as $user) {
$selected = collect($validTagIds)->shuffle()->take(self::CALLS_PER_USER);
// Resolve location from user's primary location
$locationId = $this->resolveUserLocation($user);
foreach ($selected as $tagId) {
// Random till date between 1 and 3 months from now
$tillMonths = rand(1, 3);
$till = $now->copy()->addMonths($tillMonths);
$call = Call::create([
'callable_id' => $user->id,
'callable_type' => 'App\Models\User',
'tag_id' => $tagId,
'location_id' => $locationId,
'from' => $now->utc(),
'till' => $till,
'is_public' => true,
'is_suppressed' => false,
'is_paused' => false,
]);
$tagName = $tagNames[$tagId] ?? 'this skill';
CallTranslation::create([
'call_id' => $call->id,
'locale' => 'en',
'content' => "Looking to connect with others around {$tagName}. Available for the coming months.",
]);
$count++;
}
}
$this->command->info("Seeded {$count} calls for " . $users->count() . ' users.');
}
/**
* Resolve or create a standalone Location record from the user's primary location.
*/
private function resolveUserLocation(User $user): ?int
{
$userLocation = $user->locations->first();
if (!$userLocation) {
return null;
}
$attributes = array_filter([
'country_id' => $userLocation->country_id ?: null,
'division_id' => $userLocation->division_id ?: null,
'city_id' => $userLocation->city_id ?: null,
'district_id' => $userLocation->district_id ?: null,
]);
if (empty($attributes)) {
return null;
}
// Find existing standalone Location (no locatable_id/type) or create one
$location = Location::whereNull('locatable_id')
->whereNull('locatable_type')
->where($attributes)
->first();
if (!$location) {
$location = new Location($attributes);
$location->save();
}
return $location->id;
}
private function reindexAffectedUsers(): void
{
// Disable queue so indexing happens synchronously with full relationship loading
config(['scout.queue' => false]);
$cutoff = now()->subMinutes(10)->toDateTimeString();
$userIds = DB::table('taggable_taggables')
->where('taggable_type', 'App\Models\User')
->where('created_at', '>=', $cutoff)
->pluck('taggable_id')
->merge(
DB::table('calls')->where('created_at', '>=', $cutoff)->pluck('callable_id')
)
->unique();
$bar = $this->command->getOutput()->createProgressBar($userIds->count());
User::whereIn('id', $userIds)->each(function (User $user) use ($bar) {
$user->searchable();
$bar->advance();
});
$bar->finish();
$this->command->newLine();
// Also re-index the calls themselves
$this->command->info('Re-indexing calls in Elasticsearch...');
config(['scout.queue' => false]);
$callIds = DB::table('calls')->where('created_at', '>=', $cutoff)->pluck('id');
$callBar = $this->command->getOutput()->createProgressBar($callIds->count());
Call::whereIn('id', $callIds)->each(function (Call $call) use ($callBar) {
$call->searchable();
$callBar->advance();
});
$callBar->finish();
$this->command->newLine();
}
private function rollback(): void
{
// Remove only the test-seeded data (created recently)
$cutoff = now()->subHour()->toDateTimeString();
// Delete call_translations first (FK constraint), then calls
$callIds = DB::table('calls')
->where('created_at', '>=', $cutoff)
->pluck('id');
$translationsDeleted = DB::table('call_translations')
->whereIn('call_id', $callIds)
->delete();
$this->command->info("Removed {$translationsDeleted} test call translations.");
$deleted = DB::table('calls')
->where('created_at', '>=', $cutoff)
->delete();
$this->command->info("Removed {$deleted} test calls.");
$deleted = DB::table('taggable_taggables')
->where('taggable_type', 'App\Models\User')
->where('created_at', '>=', $cutoff)
->delete();
$this->command->info("Removed {$deleted} test tag assignments.");
$this->command->info('Re-indexing affected users in Elasticsearch (synchronously)...');
$this->reindexAffectedUsers();
$this->command->info('Rollback complete.');
}
}

View File

@@ -0,0 +1,89 @@
<?php
namespace Database\Seeders;
use Illuminate\Database\Seeder;
class TransactionTypesTableSeeder extends Seeder
{
/**
* Auto generated seed file
*
* @return void
*/
public function run()
{
\DB::table('transaction_types')->delete();
\DB::table('transaction_types')->insert(array (
0 =>
array (
'id' => 1,
'name' => 'Work',
'label' => 'Worked time: for the total time worked or helped',
'icon' => 'clock',
'created_at' => NULL,
'updated_at' => NULL,
),
1 =>
array (
'id' => 2,
'name' => 'Gift',
'label' => 'Gift: without something in return',
'icon' => 'gift',
'created_at' => NULL,
'updated_at' => NULL,
),
2 =>
array (
'id' => 3,
'name' => 'Donation',
'label' => 'Donation: to support the cause of this organization',
'icon' => 'hand-thumb-up',
'created_at' => NULL,
'updated_at' => NULL,
),
3 =>
array (
'id' => 4,
'name' => 'Currency creation',
'label' => 'Currency creation',
'icon' => 'bolt',
'created_at' => NULL,
'updated_at' => NULL,
),
4 =>
array (
'id' => 5,
'name' => 'Currency removal',
'label' => 'Currenct removal',
'icon' => 'bolt-slash',
'created_at' => NULL,
'updated_at' => NULL,
),
5 =>
array (
'id' => 6,
'name' => 'Migration',
'label' => 'Migration: to switch from one\'s own bank account',
'icon' => 'truck',
'created_at' => NULL,
'updated_at' => NULL,
),
6 =>
array (
'id' => 7,
'name' => 'Rounding correction',
'label' => 'Rounding correction: corrects balance drift from decimal-to-time format conversion',
'icon' => 'wrench',
'created_at' => NULL,
'updated_at' => NULL,
),
));
}
}

View File

@@ -0,0 +1,47 @@
<?php
namespace Database\Seeders;
use App\Models\Account;
use App\Models\Locations\Location;
use App\Models\User;
use Illuminate\Database\Seeder;
class UserSeeder extends Seeder
{
/**
* Run the database seeds.
*
* @return void
*/
public function run()
{
$usersCount = max((int)$this->command->ask('How many fake users would you like?', 200), 0);
$cities = [
305, // The Hague is used more frequent
305, // The Hague
305, // The Hague
305, // The Hague
300, // Delft
330, // Rijswijk
342, // Zoetermeer
345, // Brussels is used slightly more frequent
345, // Brussels
346, // Antwerp
];
User::factory()->count($usersCount)
->has(Account::factory()->state(['name' => 'Personal Account']))
->create()
->each(
function ($user) use ($cities) {
// Create a location with a random city_id for each user
Location::factory()->create([
'locatable_type' => User::class, // This specifies the relation is with User
'locatable_id' => $user->id,
'city_id' => collect($cities)->random(),
]);
}
);
}
}

0
database/seeders/backup/.gitignore vendored Normal file
View File

File diff suppressed because it is too large Load Diff