Fix MySQL connection and DatabaseSeeder BOM issues

Two critical fixes:

1. DB_PORT was being appended to Laravel .env file
   - Setup script was writing DB_PORT=3307 (external port)
   - Laravel needs internal Docker port (3306)
   - Now ports are commented out in .env (reference only)
   - Docker-compose uses env vars, Laravel uses fixed internal ports

2. DatabaseSeeder.php had UTF-8 BOM (Byte Order Mark)
   - Caused 'Namespace declaration must be first statement' error
   - Removed invisible BOM bytes from file

These fixes ensure:
- MySQL connections work from within Docker network
- Database seeding completes successfully
- Fresh setup works end-to-end
This commit is contained in:
2026-03-11 06:09:36 +02:00
parent 306413ca56
commit 119eaf1873
3 changed files with 19 additions and 13 deletions

View File

@@ -1,4 +1,4 @@
<?php
<?php
namespace Database\Seeders;