first commit
This commit is contained in:
commit
405df0a122
3083 changed files with 69203 additions and 0 deletions
114
DOMAINS-CONFIG.md
Normal file
114
DOMAINS-CONFIG.md
Normal file
|
|
@ -0,0 +1,114 @@
|
|||
# Multi-Domain-Konfiguration für Laravel
|
||||
|
||||
Dieses Projekt unterstützt mehrere Domains mit unterschiedlichen Styles und Konfigurationen.
|
||||
Die Domains werden über `.env`-Variablen konfiguriert.
|
||||
|
||||
## Basis-Konfiguration
|
||||
|
||||
Füge die folgenden Variablen zu deiner `.env`-Datei hinzu:
|
||||
|
||||
```env
|
||||
# Domain-Konfigurationen
|
||||
APP_NAME=pr-copilot
|
||||
APP_URL=https://pr-copilot.test
|
||||
APP_PRIMARY="#3ea3dc"
|
||||
APP_ACCENT="#5c5c60"
|
||||
|
||||
# Entwicklungseinstellungen für Domains
|
||||
DEV_SIMULATE_DOMAIN=false
|
||||
DEV_SIMULATED_DOMAIN=pr-copilot.test
|
||||
```
|
||||
|
||||
## Entwicklungsmodus
|
||||
|
||||
Während der Entwicklung kann es nützlich sein, verschiedene Domains zu simulieren,
|
||||
ohne die Host-Datei bearbeiten zu müssen:
|
||||
|
||||
1. Setze `DEV_SIMULATE_DOMAIN=true` in deiner `.env`-Datei.
|
||||
2. Setze `DEV_SIMULATED_DOMAIN` auf eine der konfigurierten Domains (z.B. `landing1.local`).
|
||||
|
||||
Dies bewirkt, dass die Anwendung so reagiert, als würde sie unter der angegebenen Domain laufen,
|
||||
unabhängig von der tatsächlichen URL.
|
||||
|
||||
## Domain-spezifische Konfiguration
|
||||
|
||||
Jede Domain kann eigene Einstellungen haben:
|
||||
|
||||
### Haupt-Website (pr-copilot.test)
|
||||
|
||||
- `APP_URL`: Die Domain für die Haupt-Website (https://pr-copilot.test)
|
||||
- `APP_NAME`: Der Name der Haupt-Website (pr-copilot)
|
||||
- `APP_PRIMARY`: Die primäre Farbe im HEX-Format (#3ea3dc)
|
||||
- `APP_ACCENT`: Die Akzentfarbe im HEX-Format (#5c5c60)
|
||||
|
||||
### Presseecho (presseecho.test)
|
||||
|
||||
- `APP_PRESSEECHO`: Die Domain für Presseecho (presseecho.test)
|
||||
- `APP_PRESSEECHO_URL`: Die vollständige URL (https://presseecho.test)
|
||||
- `APP_PRESSEECHO_NAME`: Der Name der Website (presseecho)
|
||||
- `APP_PRESSEECHO_PRIMARY`: Die primäre Farbe im HEX-Format (#e94a3c)
|
||||
- `APP_PRESSEECHO_ACCENT`: Die Akzentfarbe im HEX-Format (#5c5c60)
|
||||
|
||||
### Business Portal (businessportal24.test)
|
||||
|
||||
- `APP_BUSINESSPORTAL`: Die Domain für das Business Portal (businessportal24.test)
|
||||
- `APP_BUSINESSPORTAL_URL`: Die vollständige URL (https://businessportal24.test)
|
||||
- `APP_BUSINESSPORTAL_NAME`: Der Name der Website (businessportal24)
|
||||
- `APP_BUSINESSPORTAL_PRIMARY`: Die primäre Farbe im HEX-Format (#f69f0f)
|
||||
- `APP_BUSINESSPORTAL_ACCENT`: Die Akzentfarbe im HEX-Format (#5c5c60)
|
||||
|
||||
## Hosts-Datei konfigurieren
|
||||
|
||||
Um die verschiedenen Domains lokal zu testen, füge folgende Zeilen zu deiner Hosts-Datei hinzu:
|
||||
|
||||
```
|
||||
127.0.0.1 pr-copilot.test
|
||||
127.0.0.1 presseecho.test
|
||||
127.0.0.1 businessportal24.test
|
||||
```
|
||||
|
||||
Die Hosts-Datei befindet sich unter:
|
||||
|
||||
- Windows: `C:\Windows\System32\drivers\etc\hosts`
|
||||
- macOS/Linux: `/etc/hosts`
|
||||
|
||||
## Verwendung im Code
|
||||
|
||||
Im Code kannst du auf die Domain-Konfiguration zugreifen:
|
||||
|
||||
```php
|
||||
// Domain-Name in einem View
|
||||
{{ $domainName }}
|
||||
|
||||
// Theme in einem View
|
||||
{{ $theme }}
|
||||
|
||||
// Vollständige Domain-Konfiguration
|
||||
{{ $domainConfig['description'] }}
|
||||
|
||||
// Über die app-Config
|
||||
{{ config('app.theme') }}
|
||||
{{ config('app.domain_name') }}
|
||||
|
||||
// Aktuelle Domain ermitteln
|
||||
{{ request()->getHost() }}
|
||||
|
||||
// Domain-spezifische Assets laden
|
||||
@vite(['resources/css/web/theme-main.css'])
|
||||
```
|
||||
|
||||
## Aktuelle Implementierung
|
||||
|
||||
Das Projekt verwendet bereits eine Multi-Domain-Architektur mit:
|
||||
|
||||
- **Hauptwebsite:** `pr-copilot.test` - Hauptwebsite mit blauem Theme (#3ea3dc)
|
||||
- **Presseecho:** `presseecho.test` - Presseecho-Website mit rotem Theme (#e94a3c)
|
||||
- **Business Portal:** `businessportal24.test` - Business Portal mit orangem Theme (#f69f0f)
|
||||
|
||||
Jede Domain kann eigene Farben, Namen und Konfigurationen haben und lädt automatisch domainspezifische Assets über Vite.
|
||||
|
||||
## Verfügbare Routen
|
||||
|
||||
- **Web:** `/`, `/welcome`
|
||||
- **Auth:** `/login`, `/register`, `/forgot-password`
|
||||
- **Admin:** `/dashboard`, `/admin/users`, `/settings/*` (falls implementiert)
|
||||
Loading…
Add table
Add a link
Reference in a new issue