Implement multi-tenancy support with OAuth2 authentication for tenant admins, Stripe integration for event purchases and credits ledger, new Filament resources for event purchases, updated API routes and middleware for tenant isolation and token guarding, added factories/seeders/migrations for new models (Tenant, EventPurchase, OAuth entities, etc.), enhanced tests, and documentation updates. Removed outdated DemoAchievementsSeeder.
This commit is contained in:
@@ -9,6 +9,17 @@ class TasksSeeder extends Seeder
|
||||
{
|
||||
public function run(): void
|
||||
{
|
||||
// Create or get demo tenant
|
||||
$demoTenant = \App\Models\Tenant::updateOrCreate(
|
||||
['slug' => 'demo'],
|
||||
[
|
||||
'name' => ['de' => 'Demo Tenant', 'en' => 'Demo Tenant'],
|
||||
'domain' => null,
|
||||
'is_active' => true,
|
||||
'settings' => [],
|
||||
]
|
||||
);
|
||||
|
||||
$seed = [
|
||||
'Liebe' => [
|
||||
['title'=>['de'=>'Kuss-Foto','en'=>'Kiss Photo'], 'description'=>['de'=>'Macht ein romantisches Kuss-Foto','en'=>'Take a romantic kiss photo'], 'difficulty'=>'easy'],
|
||||
@@ -32,8 +43,10 @@ class TasksSeeder extends Seeder
|
||||
foreach ($tasks as $t) {
|
||||
Task::updateOrCreate([
|
||||
'emotion_id' => $emotion->id,
|
||||
'title->de' => $t['title']['de']
|
||||
'title->de' => $t['title']['de'],
|
||||
'tenant_id' => $demoTenant->id
|
||||
], [
|
||||
'tenant_id' => $demoTenant->id,
|
||||
'emotion_id' => $emotion->id,
|
||||
'event_type_id' => isset($t['event_type']) && isset($types[$t['event_type']]) ? $types[$t['event_type']] : null,
|
||||
'title' => $t['title'],
|
||||
|
||||
Reference in New Issue
Block a user