First commit

This commit is contained in:
Kevin Adametz 2025-10-20 17:50:35 +02:00
commit 7cf3558ba7
12933 changed files with 1180047 additions and 0 deletions

217
.devcontainer/Readme.md Normal file
View file

@ -0,0 +1,217 @@
# Laravel Sail DevContainer Setup
Diese Dokumentation beschreibt die Einrichtung und Verwendung des DevContainers für das Laravel Sail-Projekt.
## Übersicht
Der DevContainer ermöglicht es, das Laravel-Projekt in einer vollständig konfigurierten Docker-Umgebung zu entwickeln, ohne dass lokale PHP-, Node.js- oder andere Abhängigkeiten installiert werden müssen.
## Voraussetzungen
- Docker Desktop installiert und laufend
- Cursor.ai oder VS Code mit DevContainer-Erweiterung
- Git (für Repository-Zugriff)
## Konfiguration
### 1. DevContainer-Konfiguration (`devcontainer.json`)
Die Hauptkonfiguration befindet sich in `.devcontainer/devcontainer.json`:
- **Eigenständiges Docker-Image**: Verwendet `sail-8.4/app` direkt ohne Docker Compose
- **Build-Konfiguration**: Definiert Build-Argumente für `WWWUSER` und `WWWGROUP`
- **Workspace**: `/var/www/html` (Standard-Laravel-Verzeichnis)
- **Benutzer**: `sail` (Laravel Sail Standard-Benutzer)
- **Features**: Leer (Tools werden über postCreateCommand installiert)
- **Extensions**: PHP, Laravel Blade, Tailwind CSS Extensions
- **Port-Forwarding**: Automatisch für wichtige Services (5173, 33061, 6380, 8025)
### 2. Dockerfile-Anpassungen (`docker/8.4/Dockerfile`)
Das Dockerfile wurde angepasst um:
- `ARG WWWUSER` hinzugefügt für korrekte Benutzer-ID
- Benutzererstellung mit dynamischen IDs (`$WWWUSER` statt feste `1337`)
- Vollständige Laravel-Umgebung mit PHP 8.4, Composer, NPM, Git
## Installation
### Automatische Installation (Empfohlen)
1. Öffnen Sie das Projekt in Cursor.ai oder VS Code
2. Klicken Sie auf "Reopen in Container" wenn die DevContainer-Benachrichtigung erscheint
3. Warten Sie bis der Container gebaut und gestartet ist
### Manuelle Installation
Falls die automatische Installation fehlschlägt, können Sie den Container manuell bauen:
```bash
cd /Users/pandora/Sites/b2in.local
docker build --build-arg WWWUSER=501 --build-arg WWWGROUP=20 -f docker/8.4/Dockerfile -t sail-8.4/app docker/8.4
```
## Verfügbare Tools
Nach der Installation sind folgende Tools verfügbar:
- **PHP 8.4.12**: Mit Xdebug für Debugging
- **Composer**: Für Laravel-Abhängigkeiten
- **NPM**: Für Frontend-Assets
- **Git**: Für Versionskontrolle
- **Node.js**: Für JavaScript-Entwicklung
Überprüfen Sie die Installation:
```bash
which git
which npm
which composer
php --version
```
## Post-Create-Befehle
Nach dem Erstellen des Containers werden automatisch ausgeführt:
1. Composer-Abhängigkeiten (`composer install`)
## Entwicklung
### Erste Schritte
1. **Composer-Abhängigkeiten**: Werden automatisch installiert
2. **Laravel-Konfiguration**: `.env` Datei muss manuell erstellt werden (siehe Laravel-Dokumentation)
3. **Datenbank-Migrationen**: `php artisan migrate`
4. **Asset-Kompilierung**: `npm install && npm run dev`
### Häufige Befehle
```bash
# Laravel-Befehle
php artisan migrate
php artisan serve
php artisan tinker
# Composer
composer install
composer update
# NPM/Node
npm install
npm run dev
npm run build
# Sail-Befehle (falls verfügbar)
./vendor/bin/sail up
./vendor/bin/sail artisan migrate
```
## Troubleshooting
### Container startet nicht
1. Überprüfen Sie ob Docker Desktop läuft
2. Stellen Sie sicher, dass keine anderen Container die benötigten Ports blockieren
3. Versuchen Sie einen Clean-Build: `docker build --no-cache ...`
### Berechtigungsprobleme
Die Container sind so konfiguriert, dass sie mit Ihrer lokalen Benutzer-ID (`501`) laufen, um Berechtigungsprobleme zu vermeiden.
### NPM Global Install Probleme
Falls Sie globale NPM-Pakete installieren möchten, verwenden Sie lokale Installation:
```bash
# Lokale Installation (empfohlen)
npm install package-name
# Oder NPM-Prefix ändern
mkdir ~/.npm-global
npm config set prefix '~/.npm-global'
echo 'export PATH=~/.npm-global/bin:$PATH' >> ~/.bashrc
source ~/.bashrc
```
### Claude CLI Kompatibilitätsprobleme
**Problem**: Das `@anthropic-ai/claude-code` Paket ist nicht mit modernen Node.js-Versionen kompatibel.
**Symptome**:
- Viele veraltete Abhängigkeiten (deprecated packages)
- PhantomJS ARM64 Kompatibilitätsprobleme
- Engine-Konflikte mit Node.js v22
**Lösung**:
curl -fsSL https://claude.ai/install.sh | bash
echo 'export PATH=\"/root/.local/bin:$PATH\"' >> /home/sail/.bashrc
### Port-Konflikte
Falls Ports bereits belegt sind, können Sie die Port-Mapping in der DevContainer-Konfiguration anpassen.
## Erweiterte Konfiguration
### Zusätzliche Extensions hinzufügen
Bearbeiten Sie `devcontainer.json` und fügen Sie Extensions zum `extensions` Array hinzu:
```json
"extensions": [
"bmewburn.vscode-intelephense-client",
"onecentlin.laravel-blade",
"shufo.vscode-blade-formatter",
"bradlc.vscode-tailwindcss",
"ihrc.vscode-php-cs-fixer"
]
```
### Zusätzliche Tools installieren
Fügen Sie Tools zum `postCreateCommand` hinzu:
```json
"postCreateCommand": "composer install --no-interaction --prefer-dist --optimize-autoloader && npm install -g your-tool"
```
## Support
Bei Problemen mit dem DevContainer:
1. Überprüfen Sie die Docker-Logs: `docker logs <container-name>`
2. Stellen Sie sicher, dass alle Umgebungsvariablen korrekt gesetzt sind
3. Versuchen Sie einen Neustart des DevContainers
## Bekannte Probleme und Lösungen
### DevContainer-CLI Kompatibilität
**Problem**: DevContainer-CLI erstellt temporäre Docker-Compose-Dateien die mit der Konfiguration kollidieren.
**Lösung**: Verwendung eines eigenständigen Docker-Images ohne Docker Compose-Abhängigkeit.
### Features-Installation
**Problem**: DevContainer Features können zu Build-Fehlern führen.
**Lösung**: Tools werden über `postCreateCommand` installiert statt über Features.
### Root-Berechtigungen
**Problem**: Der `sail`-Benutzer hat keine Root-Rechte für Paket-Installation.
**Lösung**: Alle notwendigen Tools sind bereits im Docker-Image installiert.
---
**Letzte Aktualisierung**: September 2025
**Laravel Version**: 12.x
**PHP Version**: 8.4.12
**Docker Version**: 2.x
**Status**: ✅ Vollständig funktionsfähig

View file

@ -0,0 +1,83 @@
{
"name": "B2In (Dev Container)",
// 1. DIES IST DER WICHTIGSTE TEIL:
// Wir verwenden Docker Compose für alle Services
"dockerComposeFile": [
"../docker-compose.yml"
],
"service": "laravel.test",
// 3. WIR DEFINIEREN DEN ARBEITSBEREICH:
// Das ist der Pfad, in dem Ihr Code *innerhalb* des Containers liegt.
"workspaceFolder": "/var/www/html",
// 4. WIR LEGEN DEN BENUTZER FEST:
// Laravel Sail führt Befehle standardmäßig als 'sail'-Benutzer aus, um Berechtigungsprobleme zu vermeiden.
"remoteUser": "sail",
// 5. ZUSÄTZLICHE ENTWICKLER-TOOLS (FEATURES):
// Features werden über postCreateCommand installiert um Kompatibilitätsprobleme zu vermeiden
"features": {},
// 6. BEFEHLE NACH DEM ERSTELLEN:
// Installiert nur die Tools die ohne Root-Rechte funktionieren
//"postCreateCommand": "composer install --no-interaction --prefer-dist --optimize-autoloader",
// 7. EDITOR-ANPASSUNGEN (Optional, aber sehr empfohlen):
"customizations": {
"vscode": {
"extensions": [
"bmewburn.vscode-intelephense-client",
"onecentlin.laravel-blade",
"shufo.vscode-blade-formatter",
"bradlc.vscode-tailwindcss"
]
}
},
// 8. ZU STARTENDE DIENSTE:
// Legt fest, welche Dienste aus der docker-compose.yml gestartet werden sollen.
"runServices": [
"laravel.test",
"mysql",
"redis",
"mailpit"
],
// 9. ZUSÄTZLICHE KONFIGURATION:
// Umgebungsvariablen für den DevContainer
"containerEnv": {
"WWWUSER": "501",
"WWWGROUP": "20",
"LARAVEL_SAIL": "1"
},
// 10. MOUNT-KONFIGURATION:
// Stellt sicher, dass der Code korrekt gemountet wird
"mounts": [
"source=${localWorkspaceFolder},target=/var/www/html,type=bind,consistency=cached"
],
// 11. FORWARD PORTS:
// Ports die automatisch weitergeleitet werden sollen
"forwardPorts": [
5174,
5175,
33067,
6381,
8026
],
"portsAttributes": {
"5174": {
"label": "Vite Dev Server (Portal)",
"onAutoForward": "notify"
},
"5175": {
"label": "Vite Dev Server (Web)",
"onAutoForward": "notify"
},
"33067": {
"label": "MySQL",
"onAutoForward": "silent"
},
"6381": {
"label": "Redis",
"onAutoForward": "silent"
},
"8026": {
"label": "Mailpit Dashboard",
"onAutoForward": "notify"
}
}
}

View file

@ -0,0 +1,130 @@
services:
laravel.test:
build:
context: '../vendor/laravel/sail/runtimes/8.4'
dockerfile: Dockerfile
args:
# Führen Sie in Ihrem normalen Terminal `id -u` aus und tragen Sie die Zahl hier ein.
WWWUSER: '501'
# Führen Sie in Ihrem normalen Terminal `id -g` aus und tragen Sie die Zahl hier ein.
WWWGROUP: '20'
image: 'sail-8.4/app'
extra_hosts:
- 'host.docker.internal:host-gateway'
ports:
- '5174:5174'
- '5175:5175'
environment:
# Laravel Sail Environment Variables
WWWUSER: '501'
WWWGROUP: '20'
LARAVEL_SAIL: 1
XDEBUG_MODE: 'develop,debug'
XDEBUG_CONFIG: 'client_host=host.docker.internal'
IGNITION_LOCAL_SITES_PATH: '/var/www/html'
# Database Configuration
DB_CONNECTION: mysql
DB_HOST: mysql
DB_PORT: 3306
DB_DATABASE: b2in
DB_USERNAME: sail
DB_PASSWORD: password
# Application Configuration
APP_NAME: B2In
APP_ENV: local
APP_DEBUG: true
APP_URL: http://localhost
# Mail Configuration
MAIL_MAILER: smtp
MAIL_HOST: mailpit
MAIL_PORT: 1025
MAIL_USERNAME: null
MAIL_PASSWORD: null
MAIL_ENCRYPTION: null
MAIL_FROM_ADDRESS: hello@example.com
MAIL_FROM_NAME: B2In
# Redis Configuration
REDIS_HOST: redis
REDIS_PASSWORD: null
REDIS_PORT: 6379
# Vite Configuration
VITE_PORT: 5174
VITE_WEB_PORT: 5175
# Forward Ports
FORWARD_VITE_PORT: 5174
FORWARD_VITE_WEB_PORT: 5175
FORWARD_DB_PORT: 33067
FORWARD_REDIS_PORT: 6381
FORWARD_MAILPIT_PORT: 1026
FORWARD_MAILPIT_DASHBOARD_PORT: 8026
# MySQL Extra Options
MYSQL_EXTRA_OPTIONS: --default-authentication-plugin=mysql_native_password
volumes:
- '../:/var/www/html'
networks:
- sail
depends_on:
- mysql
- redis
- mailpit
mysql:
image: 'mysql/mysql-server:8.0'
ports:
- '33067:3306'
environment:
MYSQL_ROOT_PASSWORD: password
MYSQL_ROOT_HOST: '%'
MYSQL_DATABASE: b2in
MYSQL_USER: sail
MYSQL_PASSWORD: password
MYSQL_ALLOW_EMPTY_PASSWORD: 1
MYSQL_EXTRA_OPTIONS: --default-authentication-plugin=mysql_native_password
volumes:
- 'sail-mysql:/var/lib/mysql'
- '../docker/mysql/create-testing-database.sh:/docker-entrypoint-initdb.d/10-create-testing-database.sh'
networks:
- sail
healthcheck:
test:
- CMD
- mysqladmin
- ping
- '-ppassword'
retries: 3
timeout: 5s
redis:
image: 'redis:alpine'
ports:
- '6380:6379'
volumes:
- 'sail-redis:/data'
networks:
- sail
healthcheck:
test:
- CMD
- redis-cli
- ping
retries: 3
timeout: 5s
mailpit:
image: 'axllent/mailpit:latest'
ports:
- '1025:1025'
- '8025:8025'
networks:
- sail
networks:
sail:
driver: bridge
volumes:
sail-mysql:
driver: local
sail-redis:
driver: local

18
.editorconfig Normal file
View file

@ -0,0 +1,18 @@
root = true
[*]
charset = utf-8
end_of_line = lf
indent_size = 4
indent_style = space
insert_final_newline = true
trim_trailing_whitespace = true
[*.md]
trim_trailing_whitespace = false
[*.{yml,yaml}]
indent_size = 2
[docker-compose.yml]
indent_size = 4

65
.env.example Normal file
View file

@ -0,0 +1,65 @@
APP_NAME=Laravel
APP_ENV=local
APP_KEY=
APP_DEBUG=true
APP_URL=http://localhost
APP_LOCALE=en
APP_FALLBACK_LOCALE=en
APP_FAKER_LOCALE=en_US
APP_MAINTENANCE_DRIVER=file
# APP_MAINTENANCE_STORE=database
PHP_CLI_SERVER_WORKERS=4
BCRYPT_ROUNDS=12
LOG_CHANNEL=stack
LOG_STACK=single
LOG_DEPRECATIONS_CHANNEL=null
LOG_LEVEL=debug
DB_CONNECTION=sqlite
# DB_HOST=127.0.0.1
# DB_PORT=3306
# DB_DATABASE=laravel
# DB_USERNAME=root
# DB_PASSWORD=
SESSION_DRIVER=database
SESSION_LIFETIME=120
SESSION_ENCRYPT=false
SESSION_PATH=/
SESSION_DOMAIN=null
BROADCAST_CONNECTION=log
FILESYSTEM_DISK=local
QUEUE_CONNECTION=database
CACHE_STORE=database
# CACHE_PREFIX=
MEMCACHED_HOST=127.0.0.1
REDIS_CLIENT=phpredis
REDIS_HOST=127.0.0.1
REDIS_PASSWORD=null
REDIS_PORT=6379
MAIL_MAILER=log
MAIL_SCHEME=null
MAIL_HOST=127.0.0.1
MAIL_PORT=2525
MAIL_USERNAME=null
MAIL_PASSWORD=null
MAIL_FROM_ADDRESS="hello@example.com"
MAIL_FROM_NAME="${APP_NAME}"
AWS_ACCESS_KEY_ID=
AWS_SECRET_ACCESS_KEY=
AWS_DEFAULT_REGION=us-east-1
AWS_BUCKET=
AWS_USE_PATH_STYLE_ENDPOINT=false
VITE_APP_NAME="${APP_NAME}"

10
.gitattributes vendored Normal file
View file

@ -0,0 +1,10 @@
* text=auto eol=lf
*.blade.php diff=html
*.css diff=css
*.html diff=html
*.md diff=markdown
*.php diff=php
CHANGELOG.md export-ignore
README.md export-ignore

46
.github/workflows/lint.yml vendored Normal file
View file

@ -0,0 +1,46 @@
name: linter
on:
push:
branches:
- develop
- main
pull_request:
branches:
- develop
- main
permissions:
contents: write
jobs:
quality:
runs-on: ubuntu-latest
environment: Testing
steps:
- uses: actions/checkout@v4
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: '8.4'
- name: Add Flux Credentials Loaded From ENV
run: composer config http-basic.composer.fluxui.dev "${{ secrets.FLUX_USERNAME }}" "${{ secrets.FLUX_LICENSE_KEY }}"
- name: Install Dependencies
run: |
composer install -q --no-ansi --no-interaction --no-scripts --no-progress --prefer-dist
npm install
- name: Run Pint
run: vendor/bin/pint
# - name: Commit Changes
# uses: stefanzweifel/git-auto-commit-action@v5
# with:
# commit_message: fix code style
# commit_options: '--no-verify'
# file_pattern: |
# **/*
# !.github/workflows/*

27
.github/workflows/tests.yml vendored Normal file
View file

@ -0,0 +1,27 @@
name: Run Tests
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: '8.2'
extensions: dom, curl, libxml, mbstring, zip, pcntl, pdo, sqlite, pdo_sqlite
coverage: none
- name: Install Dependencies
run: composer install -q --no-ansi --no-interaction --no-scripts --no-progress --prefer-dist
- name: Run Tests
run: vendor/bin/pest

58
.gitignore vendored Normal file
View file

@ -0,0 +1,58 @@
# Laravel
/.phpunit.cache
/node_modules
/public/build
/public/hot
/public/storage
/public/vendor
/storage/*.key
/storage/app
/storage/framework
/storage/language
/storage/logs
/storage/pail
/vendor
.env
.env.backup
.env.production
.phpactor.json
.phpunit.result.cache
Homestead.json
Homestead.yaml
auth.json
npm-debug.log
yarn-error.log
# IDEs & Editors
/.fleet
/.idea
/.nova
/.vscode
/.zed
.claude/
.cursor/
# macOS
.DS_Store
.AppleDouble
.LSOverride
._*
.DocumentRevisions-V100
.fseventsd
.Spotlight-V100
.TemporaryItems
.Trashes
.VolumeIcon.icns
.com.apple.timemachine.donotpresent
.AppleDB
.AppleDesktop
Network Trash Folder
Temporary Items
.apdisk
Icon
# Project specific
_static/
_work/
_storage/

129
CLAUDE.md Normal file
View file

@ -0,0 +1,129 @@
# CLAUDE.md
This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
## Project Overview
This is a multi-domain Laravel application with Fortify/Sanctum authentication. The application supports 5 different domains with distinct themes and configurations:
- **Admin Portal**: portal.b2in.test - Backend admin user interface (uses Livewire/Flux UI)
- **B2in Main**: b2in.test - Frontend main page (uses TailwindCSS + Tailwind UI/Plus)
- **B2A Secondary**: b2a.test - Frontend secondary page (uses TailwindCSS + Tailwind UI/Plus)
- **Stileigentum**: stileigentum.test - Frontend landing page (uses TailwindCSS + Tailwind UI/Plus)
- **Style2own**: style2own.test - Frontend landing page (uses TailwindCSS + Tailwind UI/Plus)
## Development Commands
### Setup & Installation
```bash
composer install
npm install
php artisan key:generate
php artisan migrate
```
### Development Server
```bash
# Full development environment (server, queue, logs, vite)
composer run dev
# Individual components
php artisan serve
php artisan queue:listen --tries=1
php artisan pail --timeout=0
npm run dev
```
### Asset Compilation
```bash
# Development
npm run dev
# Production builds
npm run build # Main build
npm run build:admin # Admin portal assets
npm run build:web # Web assets
```
### Testing
```bash
composer run test
# Or directly:
php artisan test
```
### Code Quality
```bash
./vendor/bin/pint # Laravel Pint (PHP CS Fixer)
```
### Domain Management
```bash
php artisan domains:generate-favicons # Generate placeholder favicons for all domains
```
## Architecture
### Multi-Domain System
The application uses a sophisticated domain routing system:
- Domain configuration is managed via `.env` variables (see `DOMAINS-CONFIG.md`)
- Each domain can have custom themes, colors, and CSS
- Domain simulation available for development (`DEV_SIMULATE_DOMAIN=true`)
- Routes are organized by domain type (`routes/domains.php`, `routes/admin.php`, `routes/web.php`)
### Frontend Architecture
- **Vite**: Multiple configurations for different domains (`vite.config.js`, `vite.portal.config.js`, `vite.web.config.js`)
- **TailwindCSS**: Version 4.x with domain-specific configurations (`tailwind.config.js`, `tailwind.portal.config.js`, `tailwind.web.config.js`)
- **Backend (Portal)**: Livewire with Flux UI components and Volt for reactive components
- **Frontend Sites**: Livewire with TailwindCSS + Tailwind UI/Plus components (no Flux UI)
- **Alpine.js**: For lightweight frontend interactions
### Backend Architecture
- **Laravel Framework**: Version 12.x
- **Authentication**: Laravel Fortify + Sanctum for API authentication
- **Permissions**: Spatie Laravel Permission package
- **Database**: Configured for multiple environments with migrations in `database/migrations/`
- **Providers**: Custom providers for theme handling (`app/Providers/ThemeServiceProvider.php`)
### Key Directories
- `app/Livewire/`: Livewire components and actions
- `resources/css/web/`: Domain-specific CSS themes
- `resources/views/`: Blade templates with Flux components
- `routes/`: Domain-separated route files
- `config/`: Laravel configuration files
### Development Tools
- **Laravel Sail**: Docker development environment
- **Laravel Pail**: Real-time log monitoring
- **Laravel Debugbar**: Development debugging (barryvdh/laravel-debugbar)
- **PestPHP**: Testing framework
## Domain Configuration
Domains are configured in `config/domains.php` with environment variables:
- `DOMAIN_PORTAL`, `DOMAIN_B2IN`, `DOMAIN_B2A`, `DOMAIN_STILEIGENTUM`, `DOMAIN_STYLE2OWN`
- Each domain has custom color schemes and font families defined in the config
- Development simulation via `DEV_SIMULATE_DOMAIN` and `DEV_SIMULATED_DOMAIN`
Domain-specific configurations include:
- **portal.b2in.test**: Admin backend with Flux UI theme
- **b2in.test**: Anthracite/Dynamic Blue color scheme, Inter/IBM Plex Sans fonts
- **b2a.test**: Azur Blue/Liberty Red color scheme, Inter/Merriweather fonts
- **stileigentum.test**: Style Blue/Style Sun color scheme, Inter/Ephesis fonts
- **style2own.test**: Imperial Blue/Sand Gold color scheme, Inter/EB Garamond fonts
For local development, add domains to your hosts file:
```
127.0.0.1 portal.b2in.test
127.0.0.1 b2in.test
127.0.0.1 b2a.test
127.0.0.1 stileigentum.test
127.0.0.1 style2own.test
```
## Important Files
- `DOMAINS-CONFIG.md`: Detailed domain configuration guide
- `FORTIFY-SANCTUM-SETUP.md`: Authentication setup guide
- `composer.json`: Contains useful dev scripts (`composer run dev`, `composer run test`)
- Multiple Vite/Tailwind configs for different build targets

250
COMPONENT-STRUCTURE.md Normal file
View file

@ -0,0 +1,250 @@
# Komponenten-Struktur Optimierung
## 📁 Neue Ordnerstruktur
Die Livewire-Komponenten wurden in logische Unterordner organisiert für bessere Wartbarkeit und Übersichtlichkeit:
```
resources/views/livewire/web/components/
├── ui/ # UI-Komponenten (Header, Footer, Forms)
│ ├── header.blade.php
│ ├── footer.blade.php
│ └── contact-form.blade.php
├── sections/ # Inhalts-Sektionen
│ ├── hero.blade.php
│ ├── ecosystem-core.blade.php
│ ├── vision-section.blade.php
│ ├── brand-worlds.blade.php
│ ├── final-cta.blade.php
│ ├── partner-hero.blade.php
│ ├── partner-benefits.blade.php
│ ├── partner-process.blade.php
│ ├── commitment-section.blade.php
│ ├── dark-stats-section.blade.php
│ ├── spotlights-section.blade.php
│ ├── final-commitment.blade.php
│ ├── about-hero.blade.php
│ ├── our-story.blade.php
│ ├── leadership-team.blade.php
│ ├── our-values.blade.php
│ ├── ecosystem-hero.blade.php
│ ├── ecosystem-stats.blade.php
│ ├── end-customer-section.blade.php
│ ├── broker-section.blade.php
│ ├── supplier-section.blade.php
│ ├── digital-core.blade.php
│ ├── magazin-list.blade.php
│ └── magazin-detail.blade.php
└── demo/ # Demo-Komponenten
├── theme-info.blade.php
├── logo-demo.blade.php
├── color-demo.blade.php
├── button-demo.blade.php
├── theme-switcher.blade.php
└── demo-section.blade.php
```
## 🎯 Komponenten-Kategorien
### **UI-Komponenten** (`ui/`)
- **Zweck:** Wiederverwendbare UI-Elemente
- **Verwendung:** Header, Footer, Formulare
- **Beispiele:**
- `header.blade.php` - Navigation und Logo
- `footer.blade.php` - Footer mit Links und Logo
- `contact-form.blade.php` - Kontaktformular
### **Sektions-Komponenten** (`sections/`)
- **Zweck:** Inhalts-Sektionen für verschiedene Seiten
- **Verwendung:** Hero-Bereiche, Inhalts-Sektionen, CTAs
- **Beispiele:**
- `hero.blade.php` - Haupt-Hero-Bereich
- `ecosystem-core.blade.php` - Ecosystem-Darstellung
- `partner-hero.blade.php` - Partner-Hero-Bereich
### **Demo-Komponenten** (`demo/`)
- **Zweck:** Theme-Demo und Testing-Komponenten
- **Verwendung:** Theme-Demo-Seite, Entwicklungstools
- **Beispiele:**
- `theme-info.blade.php` - Theme-Informationen
- `color-demo.blade.php` - Farb-Demo
- `button-demo.blade.php` - Button-Demo
## 🔄 Aktualisierte View-Referenzen
### **Vorher:**
```blade
<livewire:web.components.header />
<livewire:web.components.hero />
<livewire:web.components.footer />
```
### **Nachher:**
```blade
<livewire:web.components.ui.header />
<livewire:web.components.sections.hero />
<livewire:web.components.ui.footer />
```
## 📋 Aktualisierte Views
### **Home-View** (`web/home.blade.php`)
```blade
<livewire:web.components.ui.header />
<main>
<livewire:web.components.sections.hero />
<livewire:web.components.sections.ecosystem-core />
<livewire:web.components.sections.vision-section />
<livewire:web.components.sections.brand-worlds />
<livewire:web.components.sections.final-cta />
</main>
<livewire:web.components.ui.footer />
```
### **Partner-View** (`web/partner.blade.php`)
```blade
<livewire:web.components.ui.header />
<main>
<livewire:web.components.sections.partner-hero />
<livewire:web.components.sections.partner-benefits />
<livewire:web.components.sections.partner-process />
<livewire:web.components.sections.commitment-section />
<livewire:web.components.sections.dark-stats-section />
<livewire:web.components.sections.spotlights-section />
<livewire:web.components.sections.final-commitment />
</main>
<livewire:web.components.ui.footer />
```
### **About-View** (`web/about.blade.php`)
```blade
<livewire:web.components.ui.header />
<main>
<livewire:web.components.sections.about-hero />
<livewire:web.components.sections.our-story />
<livewire:web.components.sections.leadership-team />
<livewire:web.components.sections.our-values />
<livewire:web.components.sections.partner-cta />
</main>
<livewire:web.components.ui.footer />
```
### **Contact-View** (`web/contact.blade.php`)
```blade
<livewire:web.components.ui.header />
<main>
<livewire:web.components.ui.contact-form />
</main>
<livewire:web.components.ui.footer />
```
### **Ecosystem-View** (`web/ecosystem.blade.php`)
```blade
<livewire:web.components.ui.header />
<main>
<livewire:web.components.sections.ecosystem-hero />
<livewire:web.components.sections.ecosystem-stats />
<livewire:web.components.sections.end-customer-section />
<livewire:web.components.sections.broker-section />
<livewire:web.components.sections.supplier-section />
<livewire:web.components.sections.digital-core />
</main>
<livewire:web.components.ui.footer />
```
### **Magazin-Views** (`web/magazin.blade.php`, `web/magazin-detail.blade.php`)
```blade
<livewire:web.components.ui.header />
<main>
<livewire:web.components.sections.magazin-list />
<!-- oder -->
<livewire:web.components.sections.magazin-detail :id="$id ?? 1" />
</main>
<livewire:web.components.ui.footer />
```
### **Theme-Demo-View** (`web/theme-demo.blade.php`)
```blade
<livewire:web.components.ui.header />
<main>
<livewire:web.components.demo.theme-info />
<livewire:web.components.demo.logo-demo />
<livewire:web.components.demo.color-demo />
<livewire:web.components.demo.button-demo />
<livewire:web.components.demo.theme-switcher />
</main>
<livewire:web.components.ui.footer />
```
## 🚀 Vorteile der neuen Struktur
### **1. Bessere Organisation**
- ✅ Logische Gruppierung nach Funktionalität
- ✅ Klare Trennung zwischen UI, Inhalt und Demo
- ✅ Einfache Navigation durch die Komponenten
### **2. Verbesserte Wartbarkeit**
- ✅ Änderungen an UI-Komponenten betreffen alle Seiten
- ✅ Sektions-Komponenten sind wiederverwendbar
- ✅ Demo-Komponenten sind isoliert
### **3. Skalierbarkeit**
- ✅ Einfache Erweiterung um neue Komponenten
- ✅ Klare Namenskonventionen
- ✅ Modulare Architektur
### **4. Entwicklerfreundlichkeit**
- ✅ Intuitive Pfad-Struktur
- ✅ Vorhersagbare Komponenten-Namen
- ✅ Einfache Suche und Navigation
## 🔧 Wartung und Erweiterung
### **Neue UI-Komponente hinzufügen:**
```bash
# Komponente erstellen
php artisan livewire:make Web/Components/UI/NewComponent
# View in ui/ Ordner erstellen
touch resources/views/livewire/web/components/ui/new-component.blade.php
```
### **Neue Sektions-Komponente hinzufügen:**
```bash
# Komponente erstellen
php artisan livewire:make Web/Components/Sections/NewSection
# View in sections/ Ordner erstellen
touch resources/views/livewire/web/components/sections/new-section.blade.php
```
### **Neue Demo-Komponente hinzufügen:**
```bash
# Komponente erstellen
php artisan livewire:make Web/Components/Demo/NewDemo
# View in demo/ Ordner erstellen
touch resources/views/livewire/web/components/demo/new-demo.blade.php
```
## 📝 Best Practices
1. **Namenskonventionen:** Verwende kebab-case für Dateinamen
2. **Ordnerstruktur:** Halte die logische Gruppierung bei
3. **Wiederverwendbarkeit:** UI-Komponenten sollten generisch sein
4. **Spezifität:** Sektions-Komponenten können spezifisch sein
5. **Isolation:** Demo-Komponenten sollten isoliert bleiben
## 🔍 Migration abgeschlossen
Alle Views wurden erfolgreich aktualisiert:
- ✅ `web/home.blade.php`
- ✅ `web/partner.blade.php`
- ✅ `web/about.blade.php`
- ✅ `web/contact.blade.php`
- ✅ `web/ecosystem.blade.php`
- ✅ `web/magazin.blade.php`
- ✅ `web/magazin-detail.blade.php`
- ✅ `web/theme-demo.blade.php`
Die neue Struktur ist jetzt vollständig implementiert und alle Views verwenden die optimierten Komponenten-Pfade! 🎉

75
Readme.md Normal file
View file

@ -0,0 +1,75 @@
# B2in - Multi-Domain Laravel-Anwendung
## Übersicht
Diese Laravel-Anwendung unterstützt verschiedene Domains mit unterschiedlichen Styles:
- **Admin-Portal**: portal.b2in.test - Administrative Funktionen
- **Haupt-Website**: b2in.test - Haupt-Landing-Page
- **Landing Page 1**: landing1.test - Spezifisches Thema mit Indigo/Amber-Farben
- **Landing Page 2**: landing2.test - Spezifisches Thema mit Teal/Pink-Farben
## Installation
1. Repository klonen
2. Abhängigkeiten installieren:
```bash
composer install
npm install
```
3. Umgebungsvariablen konfigurieren (siehe `.env.example` und `DOMAINS-CONFIG.md`)
4. Laravel-Anwendung initialisieren:
```bash
php artisan key:generate
php artisan migrate
```
5. Assets kompilieren:
```bash
npm run build
npm run build:admin
npm run build:web
```
## Domain-Konfiguration
Die Domains werden über die `.env`-Datei konfiguriert. Für detaillierte Anweisungen siehe `DOMAINS-CONFIG.md`.
### Hosts-Datei konfigurieren
Für die lokale Entwicklung ist es erforderlich, die folgenden Einträge in deiner Hosts-Datei hinzuzufügen:
```
127.0.0.1 portal.b2in.test
127.0.0.1 b2in.test
127.0.0.1 landing1.test
127.0.0.1 landing2.test
```
### Lokaler Entwicklungsserver
```bash
php artisan serve
```
## Asset-Kompilierung
Diese Anwendung verwendet Vite mit verschiedenen Konfigurationen:
- **Hauptkompilierung**: `npm run dev` oder `npm run build`
- **Admin-Assets**: `npm run build:admin`
- **Web-Assets**: `npm run build:web`
## Domain-Simulation
Während der Entwicklung können Domains simuliert werden, ohne die Hosts-Datei zu bearbeiten:
1. In der `.env`-Datei: `DEV_SIMULATE_DOMAIN=true`
2. Gewünschte Domain angeben: `DEV_SIMULATED_DOMAIN=landing1.local`
## Favicons
Um Platzhalter-Favicons für alle konfigurierten Domains zu generieren:
```bash
php artisan domains:generate-favicons
```

186
THEME-DEMO-COMPONENTS.md Normal file
View file

@ -0,0 +1,186 @@
# Theme Demo Komponenten
## 📋 Übersicht
Die Theme-Demo-Seite wurde in wiederverwendbare Livewire-Komponenten unterteilt, um bessere Wartbarkeit und Übersichtlichkeit zu gewährleisten.
## 🧩 Komponenten-Struktur
### 1. **ThemeInfo** (`app/Livewire/Web/Components/ThemeInfo.php`)
- **Zweck:** Zeigt aktuelle Domain-Konfiguration und Theme-Details
- **Features:**
- Domain-Name und Theme-Informationen
- Primär- und Sekundärfarben mit Farbvorschau
- Schriftarten-Informationen
- URL-Konfiguration
### 2. **LogoDemo** (`app/Livewire/Web/Components/LogoDemo.php`)
- **Zweck:** Demonstriert Logo-Varianten für das aktuelle Theme
- **Features:**
- Positives Logo auf hellem Hintergrund
- Negatives Logo auf dunklem Hintergrund
- Automatische Logo-Auswahl basierend auf Theme
### 3. **ColorDemo** (`app/Livewire/Web/Components/ColorDemo.php`)
- **Zweck:** Zeigt die Hauptfarben des aktuellen Themes
- **Features:**
- Primary-Farbe mit Hex-Code
- Secondary-Farbe mit Hex-Code
- Accent-Farbe (immer Neutral)
- Farbvorschau-Karten
### 4. **ButtonDemo** (`app/Livewire/Web/Components/ButtonDemo.php`)
- **Zweck:** Demonstriert Button-Styles und Hover-Effekte
- **Features:**
- Primary, Secondary und Accent Buttons
- Hover-Effekte mit Übergängen
- Theme-spezifische Farbwechsel
### 5. **ThemeSwitcher** (`app/Livewire/Web/Components/ThemeSwitcher.php`)
- **Zweck:** Bietet verschiedene Wege zum Theme-Switching
- **Features:**
- Domain-basierte Links
- URL-Parameter-Links
- Pfad-basierte Links für lokale Entwicklung
### 6. **DemoSection** (`app/Livewire/Web/Components/DemoSection.php`)
- **Zweck:** Wiederverwendbarer Container für Demo-Bereiche
- **Features:**
- Einheitliches Layout
- Titel und Beschreibung
- Flexible Inhalte
## 🎯 Verwendung
### Haupt-Theme-Demo-View
```blade
@extends('web.layouts.web-master')
@section('content')
<div class="min-h-screen bg-background">
<livewire:web.components.header />
<main class="section-padding">
<div class="container-padding">
<livewire:web.components.theme-info />
<livewire:web.components.logo-demo />
<livewire:web.components.color-demo />
<livewire:web.components.button-demo />
<livewire:web.components.theme-switcher />
</div>
</main>
<livewire:web.components.footer />
</div>
@endsection
```
### Einzelne Komponenten verwenden
```blade
<!-- Nur Logo-Demo -->
<livewire:web.components.logo-demo />
<!-- Nur Farb-Demo -->
<livewire:web.components.color-demo />
<!-- Nur Button-Demo -->
<livewire:web.components.button-demo />
```
## 🔧 Wartbarkeit
### Vorteile der Komponenten-Struktur:
1. **Modularität:** Jede Komponente hat einen spezifischen Zweck
2. **Wiederverwendbarkeit:** Komponenten können in anderen Views verwendet werden
3. **Wartbarkeit:** Änderungen an einer Komponente betreffen nur diese
4. **Testbarkeit:** Jede Komponente kann einzeln getestet werden
5. **Übersichtlichkeit:** Haupt-View ist sehr sauber und lesbar
### Datei-Struktur:
```
app/Livewire/Web/Components/
├── ThemeInfo.php
├── LogoDemo.php
├── ColorDemo.php
├── ButtonDemo.php
├── ThemeSwitcher.php
└── DemoSection.php
resources/views/livewire/web/components/
├── theme-info.blade.php
├── logo-demo.blade.php
├── color-demo.blade.php
├── button-demo.blade.php
├── theme-switcher.blade.php
└── demo-section.blade.php
```
## 🚀 Erweiterungen
### Neue Demo-Komponenten hinzufügen:
1. **Komponente erstellen:**
```php
// app/Livewire/Web/Components/NewDemo.php
<?php
namespace App\Livewire\Web\Components;
use Livewire\Component;
class NewDemo extends Component
{
public function render()
{
return view('livewire.web.components.new-demo');
}
}
```
2. **View erstellen:**
```blade
<!-- resources/views/livewire/web/components/new-demo.blade.php -->
<div class="text-center mb-16">
<h2 class="text-section-title mb-8">Neue Demo</h2>
<!-- Demo-Inhalt -->
</div>
```
3. **In Haupt-View einbinden:**
```blade
<livewire:web.components.new-demo />
```
### DemoSection verwenden:
```blade
<livewire:web.components.demo-section
title="Meine Demo"
description="Beschreibung der Demo"
component="my-demo" />
```
## 📝 Best Practices
1. **Einheitliche Struktur:** Alle Demo-Komponenten folgen dem gleichen Layout-Pattern
2. **Responsive Design:** Alle Komponenten sind mobile-optimiert
3. **Accessibility:** Semantische HTML-Struktur und ARIA-Labels
4. **Performance:** Minimale JavaScript-Dependencies
5. **Theme-Konsistenz:** Verwendung der Theme-Helper für dynamische Inhalte
## 🔍 Debugging
### Komponenten einzeln testen:
```bash
# Spezifische Komponente testen
php artisan livewire:make ComponentName
# Komponenten-Status prüfen
php artisan livewire:list
```
### Theme-Helper testen:
```php
// In tinker
php artisan tinker
>>> \App\Helpers\ThemeHelper::getPrimaryColor()
>>> \App\Helpers\ThemeHelper::getLogoPath('positive')
```

188
THEME-SWITCHING.md Normal file
View file

@ -0,0 +1,188 @@
# Theme-Switching System
Das Laravel-Projekt unterstützt automatisches Theme-Switching basierend auf der URL/Domain. Jede Domain lädt automatisch das entsprechende CSS-Theme und die passenden Logos.
## 🎨 Verfügbare Themes
### 1. B2IN Theme (`b2in`)
- **Domain:** `b2in.test`
- **Farben:** Anthracite (#2b3f51) & Dynamic Blue (#20a0da)
- **Schriften:** Inter & IBM Plex Sans
- **CSS:** `theme-b2in.css`
### 2. B2A Theme (`b2a`)
- **Domain:** `b2a.test`
- **Farben:** Azur Blue (#123f6d) & Liberty Red (#ce1d2e)
- **Schriften:** Inter & Merriweather
- **CSS:** `theme-b2a.css`
### 3. Stileigentum Theme (`stileigentum`)
- **Domain:** `stileigentum.test`
- **Farben:** Style Blue (#007aab) & Style Sun (#fbaf22)
- **Schriften:** Inter & Ephesis
- **CSS:** `theme-stileigentum.css`
### 4. Style2own Theme (`style2own`)
- **Domain:** `style2own.test`
- **Farben:** Imperial Blue (#123453) & Sand Gold (#c9ac84)
- **Schriften:** Inter & EB Garamond
- **CSS:** `theme-style2own.css`
## 🔧 Funktionsweise
### 1. ThemeServiceProvider
Der `ThemeServiceProvider` erkennt automatisch die aktuelle Domain und lädt die entsprechende Konfiguration:
```php
// app/Providers/ThemeServiceProvider.php
$host = Request::getHost(); // z.B. "b2in.test"
$themeOverride = Request::get('theme'); // Optional: URL-Parameter für Testing
```
### 2. ThemeHelper
Die `ThemeHelper`-Klasse stellt Hilfsfunktionen für Theme-spezifische Assets bereit:
```php
// Logo-Pfade
ThemeHelper::getLogoPath('positive'); // Positives Logo
ThemeHelper::getLogoPath('negative'); // Negatives Logo
// Farben
ThemeHelper::getPrimaryColor(); // Primärfarbe
ThemeHelper::getSecondaryColor(); // Sekundärfarbe
// Schriften
ThemeHelper::getPrimaryFont(); // Primärschrift
ThemeHelper::getSecondaryFont(); // Sekundärschrift
```
### 3. Automatisches Laden
Das System lädt automatisch:
- ✅ **CSS-Theme** basierend auf der Domain
- ✅ **Logos** (positiv/negativ) für Header und Footer
- ✅ **Favicons** für die entsprechende Domain
- ✅ **Schriftarten** entsprechend der Theme-Konfiguration
## 🚀 Verwendung
### Domain-basiertes Switching
```
https://b2in.test/ → B2IN Theme
https://b2a.test/ → B2A Theme
https://stileigentum.test/ → Stileigentum Theme
https://style2own.test/ → Style2own Theme
```
### URL-Parameter für Testing
```
/theme-demo?theme=b2in → B2IN Theme
/theme-demo?theme=b2a → B2A Theme
/theme-demo?theme=stileigentum → Stileigentum Theme
/theme-demo?theme=style2own → Style2own Theme
```
## 📁 Dateistruktur
```
app/
├── Helpers/
│ └── ThemeHelper.php # Theme-Hilfsfunktionen
├── Providers/
│ └── ThemeServiceProvider.php # Theme-Provider
└── Livewire/Web/Components/ # Komponenten verwenden ThemeHelper
resources/
├── css/web/
│ ├── shared-styles.css # Gemeinsame Styles
│ ├── theme-b2in.css # B2IN Theme
│ ├── theme-b2a.css # B2A Theme
│ ├── theme-stileigentum.css # Stileigentum Theme
│ └── theme-style2own.css # Style2own Theme
└── views/
├── web/layouts/
│ └── web-master.blade.php # Hauptlayout mit Theme-Switching
└── web/
└── theme-demo.blade.php # Demo-Seite für Theme-Testing
public/img/
├── logos/ # Domain-spezifische Logos
│ ├── b2in-logo-positive.svg
│ ├── b2in-logo-negative.svg
│ ├── B2A-Logo-positiv-2025-07-28_RGB.svg
│ ├── B2A-Logo-negativ-2025-07-28_RGB.svg
│ ├── stileigentum-logo-positiv.svg
│ ├── stileigentum-logo-negativ.svg
│ ├── style2own-logo-positiv.svg
│ └── style2own-logo-negativ.svg
└── favicons/ # Domain-spezifische Favicons
├── b2in-favicon.ico
├── b2a-favicon.ico
├── stileigentum-favicon.ico
└── style2own-favicon.ico
config/
└── domains.php # Domain-Konfigurationen
```
## 🎯 Demo-Seite
Besuchen Sie `/theme-demo` um das Theme-Switching zu testen:
- **Domain-Info:** Zeigt aktuelle Domain-Konfiguration
- **Logo-Demo:** Positive und negative Logos
- **Farb-Demo:** Theme-spezifische Farben
- **Button-Demo:** Theme-spezifische Button-Styles
- **Switching-Links:** Direkte Links zu verschiedenen Themes
## ⚙️ Konfiguration
### Neue Domain hinzufügen
1. **Domain-Konfiguration** in `config/domains.php`:
```php
'neue-domain' => [
'domain_name' => env('DOMAIN_NEUE', 'neue-domain.test'),
'url' => env('DOMAIN_NEUE_URL', 'https://neue-domain.test'),
'theme' => 'neue-domain',
'view_prefix' => 'neue-domain',
'assets_dir' => 'build/neue-domain',
'color_scheme' => [
'primary' => '#123456',
'secondary' => '#789abc',
],
'font_family' => [
'primary' => 'Inter',
'secondary' => 'Roboto',
],
],
```
2. **CSS-Theme** erstellen: `resources/css/web/theme-neue-domain.css`
3. **Logos** hinzufügen: `public/img/logos/neue-domain-logo-*.svg`
4. **ThemeHelper** erweitern: Logo-Mapping in `ThemeHelper.php`
## 🔍 Troubleshooting
### Theme wird nicht geladen
- Prüfen Sie die Domain-Konfiguration in `config/domains.php`
- Stellen Sie sicher, dass die CSS-Datei existiert
- Überprüfen Sie die Vite-Konfiguration
### Logos werden nicht angezeigt
- Prüfen Sie die Logo-Pfade in `ThemeHelper.php`
- Stellen Sie sicher, dass die Logo-Dateien existieren
- Überprüfen Sie die Dateiberechtigungen
### Farben stimmen nicht überein
- Prüfen Sie die CSS-Variablen in der Theme-Datei
- Stellen Sie sicher, dass `shared-styles.css` importiert wird
- Überprüfen Sie die HSL-Farbwerte
## 📝 Notizen
- Das System funktioniert sowohl mit echten Domains als auch mit URL-Parametern
- Alle Komponenten verwenden automatisch die Theme-spezifischen Assets
- Die Konfiguration ist vollständig über Umgebungsvariablen steuerbar
- Das System ist erweiterbar für neue Domains/Themes

View file

@ -0,0 +1,40 @@
<?php
namespace App\Actions\Fortify;
use App\Models\User;
use Illuminate\Support\Facades\Hash;
use Illuminate\Support\Facades\Validator;
use Illuminate\Validation\Rule;
use Laravel\Fortify\Contracts\CreatesNewUsers;
class CreateNewUser implements CreatesNewUsers
{
use PasswordValidationRules;
/**
* Validate and create a newly registered user.
*
* @param array<string, string> $input
*/
public function create(array $input): User
{
Validator::make($input, [
'name' => ['required', 'string', 'max:255'],
'email' => [
'required',
'string',
'email',
'max:255',
Rule::unique(User::class),
],
'password' => $this->passwordRules(),
])->validate();
return User::create([
'name' => $input['name'],
'email' => $input['email'],
'password' => Hash::make($input['password']),
]);
}
}

View file

@ -0,0 +1,18 @@
<?php
namespace App\Actions\Fortify;
use Illuminate\Validation\Rules\Password;
trait PasswordValidationRules
{
/**
* Get the validation rules used to validate passwords.
*
* @return array<int, \Illuminate\Contracts\Validation\Rule|array<mixed>|string>
*/
protected function passwordRules(): array
{
return ['required', 'string', Password::default(), 'confirmed'];
}
}

View file

@ -0,0 +1,29 @@
<?php
namespace App\Actions\Fortify;
use App\Models\User;
use Illuminate\Support\Facades\Hash;
use Illuminate\Support\Facades\Validator;
use Laravel\Fortify\Contracts\ResetsUserPasswords;
class ResetUserPassword implements ResetsUserPasswords
{
use PasswordValidationRules;
/**
* Validate and reset the user's forgotten password.
*
* @param array<string, string> $input
*/
public function reset(User $user, array $input): void
{
Validator::make($input, [
'password' => $this->passwordRules(),
])->validate();
$user->forceFill([
'password' => Hash::make($input['password']),
])->save();
}
}

View file

@ -0,0 +1,32 @@
<?php
namespace App\Actions\Fortify;
use App\Models\User;
use Illuminate\Support\Facades\Hash;
use Illuminate\Support\Facades\Validator;
use Laravel\Fortify\Contracts\UpdatesUserPasswords;
class UpdateUserPassword implements UpdatesUserPasswords
{
use PasswordValidationRules;
/**
* Validate and update the user's password.
*
* @param array<string, string> $input
*/
public function update(User $user, array $input): void
{
Validator::make($input, [
'current_password' => ['required', 'string', 'current_password:web'],
'password' => $this->passwordRules(),
], [
'current_password.current_password' => __('The provided password does not match your current password.'),
])->validateWithBag('updatePassword');
$user->forceFill([
'password' => Hash::make($input['password']),
])->save();
}
}

View file

@ -0,0 +1,58 @@
<?php
namespace App\Actions\Fortify;
use App\Models\User;
use Illuminate\Contracts\Auth\MustVerifyEmail;
use Illuminate\Support\Facades\Validator;
use Illuminate\Validation\Rule;
use Laravel\Fortify\Contracts\UpdatesUserProfileInformation;
class UpdateUserProfileInformation implements UpdatesUserProfileInformation
{
/**
* Validate and update the given user's profile information.
*
* @param array<string, string> $input
*/
public function update(User $user, array $input): void
{
Validator::make($input, [
'name' => ['required', 'string', 'max:255'],
'email' => [
'required',
'string',
'email',
'max:255',
Rule::unique('users')->ignore($user->id),
],
])->validateWithBag('updateProfileInformation');
if ($input['email'] !== $user->email &&
$user instanceof MustVerifyEmail) {
$this->updateVerifiedUser($user, $input);
} else {
$user->forceFill([
'name' => $input['name'],
'email' => $input['email'],
])->save();
}
}
/**
* Update the given verified user's profile information.
*
* @param array<string, string> $input
*/
protected function updateVerifiedUser(User $user, array $input): void
{
$user->forceFill([
'name' => $input['name'],
'email' => $input['email'],
'email_verified_at' => null,
])->save();
$user->sendEmailVerificationNotification();
}
}

View file

@ -0,0 +1,73 @@
<?php
namespace App\Console\Commands;
use Illuminate\Console\Command;
use Illuminate\Support\Facades\File;
class GenerateDomainFavicons extends Command
{
/**
* The name and signature of the console command.
*
* @var string
*/
protected $signature = 'domains:generate-favicons';
/**
* The console command description.
*
* @var string
*/
protected $description = 'Generiere Favicons für alle konfigurierten Domains';
/**
* Execute the console command.
*/
public function handle()
{
$domains = config('domains');
$faviconDir = public_path('img/favicons');
// Erstelle das Favicon-Verzeichnis, wenn es nicht existiert
if (! File::exists($faviconDir)) {
File::makeDirectory($faviconDir, 0755, true);
$this->info("Verzeichnis {$faviconDir} erstellt.");
}
// Erstelle eine Liste der Themes, für die wir Favicons erstellen müssen
$themes = [];
foreach ($domains as $domain => $config) {
if (is_array($config) && isset($config['theme'])) {
$themes[$config['theme']] = [
'domain' => $domain,
'name' => $config['name'] ?? 'Website',
'color' => $config['color_scheme']['primary'] ?? '#000000',
];
}
}
// Erstelle die Favicons
foreach ($themes as $theme => $data) {
$faviconPath = "{$faviconDir}/{$theme}-favicon.ico";
// Wenn die Datei bereits existiert, frage, ob sie überschrieben werden soll
if (File::exists($faviconPath) && ! $this->confirm("Favicon für '{$theme}' existiert bereits. Überschreiben?")) {
$this->info("Favicon für '{$theme}' übersprungen.");
continue;
}
// Hier könntest du mit einer externen Bibliothek einen Favicon erstellen
// Da dies aber komplex sein kann, erstellen wir erstmal nur Platzhalter-Dateien
File::put($faviconPath, '');
$this->info("Platzhalter-Favicon für '{$theme}' erstellt: {$faviconPath}");
$this->comment("Ersetze diese Datei mit einem echten Favicon für {$data['domain']} ({$data['name']})");
}
$this->info('Favicons wurden erfolgreich erstellt!');
$this->line('Denke daran, die Platzhalter-Dateien mit echten Favicons zu ersetzen.');
}
}

36
app/Console/Kernel.php Normal file
View file

@ -0,0 +1,36 @@
<?php
namespace App\Console;
use Illuminate\Console\Scheduling\Schedule;
use Illuminate\Foundation\Console\Kernel as ConsoleKernel;
class Kernel extends ConsoleKernel
{
/**
* The Artisan commands provided by your application.
*
* @var array
*/
protected $commands = [
\App\Console\Commands\GenerateDomainFavicons::class,
];
/**
* Define the application's command schedule.
*/
protected function schedule(Schedule $schedule): void
{
// $schedule->command('inspire')->hourly();
}
/**
* Register the commands for the application.
*/
protected function commands(): void
{
$this->load(__DIR__.'/Commands');
require base_path('routes/console.php');
}
}

113
app/Helpers/ThemeHelper.php Normal file
View file

@ -0,0 +1,113 @@
<?php
namespace App\Helpers;
class ThemeHelper
{
/**
* Get the logo path based on the current theme
*/
public static function getLogoPath(string $type = 'positive'): string
{
$theme = config('app.theme', 'b2in');
$logoMap = [
'b2in' => [
'positive' => 'img/logos/b2in-logo-positive.svg',
'negative' => 'img/logos/b2in-logo-negative.svg'
],
'b2a' => [
'positive' => 'img/logos/b2a-logo-positiv.svg',
'negative' => 'img/logos/b2a-logo-negativ.svg'
],
'stileigentum' => [
'positive' => 'img/logos/stileigentum-logo-positiv.svg',
'negative' => 'img/logos/stileigentum-logo-negativ.svg'
],
'style2own' => [
'positive' => 'img/logos/style2own-logo-positiv.svg',
'negative' => 'img/logos/style2own-logo-negativ.svg'
]
];
return $logoMap[$theme][$type] ?? $logoMap['b2in'][$type];
}
/**
* Get the favicon path based on the current theme
*/
public static function getFaviconPath(): string
{
$theme = config('app.theme', 'b2in');
return "img/favicons/{$theme}-favicon.ico";
}
/**
* Get the CSS theme file based on the current theme
*/
public static function getThemeCssPath(): string
{
$theme = config('app.theme', 'b2in');
return "resources/css/web/theme-{$theme}.css";
}
/**
* Get domain-specific configuration
*/
public static function getDomainConfig(): array
{
$theme = config('app.theme', 'b2in');
return config("domains.domains.{$theme}", []);
}
/**
* Get primary color for the current theme
*/
public static function getPrimaryColor(): string
{
$config = self::getDomainConfig();
return $config['color_scheme']['primary'] ?? '#2b3f51';
}
/**
* Get secondary color for the current theme
*/
public static function getSecondaryColor(): string
{
$config = self::getDomainConfig();
return $config['color_scheme']['secondary'] ?? '#20a0da';
}
/**
* Get primary font family for the current theme
*/
public static function getPrimaryFont(): string
{
$config = self::getDomainConfig();
return $config['font_family']['primary'] ?? 'Inter';
}
/**
* Get secondary font family for the current theme
*/
public static function getSecondaryFont(): string
{
$config = self::getDomainConfig();
return $config['font_family']['secondary'] ?? 'IBM Plex Sans';
}
/**
* Get domain name for the current theme
*/
public static function getDomainName(): string
{
$config = self::getDomainConfig();
return $config['domain_name'] ?? 'B2IN';
}
public static function getDomainUrl(): string
{
$config = self::getDomainConfig();
return $config['url'] ?? config('app.url');
}
}

View file

@ -0,0 +1,30 @@
<?php
namespace App\Http\Controllers\Auth;
use App\Http\Controllers\Controller;
use Illuminate\Auth\Events\Verified;
use Illuminate\Foundation\Auth\EmailVerificationRequest;
use Illuminate\Http\RedirectResponse;
class VerifyEmailController extends Controller
{
/**
* Mark the authenticated user's email address as verified.
*/
public function __invoke(EmailVerificationRequest $request): RedirectResponse
{
if ($request->user()->hasVerifiedEmail()) {
return redirect()->intended(route('dashboard', absolute: false).'?verified=1');
}
if ($request->user()->markEmailAsVerified()) {
/** @var \Illuminate\Contracts\Auth\MustVerifyEmail $user */
$user = $request->user();
event(new Verified($user));
}
return redirect()->intended(route('dashboard', absolute: false).'?verified=1');
}
}

View file

@ -0,0 +1,8 @@
<?php
namespace App\Http\Controllers;
abstract class Controller
{
//
}

View file

@ -0,0 +1,28 @@
<?php
namespace App\Http\Middleware;
use Closure;
use Illuminate\Http\Request;
use Symfony\Component\HttpFoundation\Response;
class BasicAuthMiddleware
{
/**
* Handle an incoming request.
*
* @param \Closure(\Illuminate\Http\Request): (\Symfony\Component\HttpFoundation\Response) $next
*/
public function handle(Request $request, Closure $next): Response
{
// Credentials from .env file
$user = config('auth.basic.user');
$pass = config('auth.basic.password');
if ($request->getUser() != $user || $request->getPassword() != $pass) {
return response('Unauthorized.', 401, ['WWW-Authenticate' => 'Basic']);
}
return $next($request);
}
}

View file

@ -0,0 +1,57 @@
<?php
namespace App\Http\Middleware;
use Closure;
use Illuminate\Http\Request;
use Symfony\Component\HttpFoundation\Response;
class ThemeMiddleware
{
/**
* Handle an incoming request.
*
* @param \Closure(\Illuminate\Http\Request): (\Symfony\Component\HttpFoundation\Response) $next
*/
public function handle(Request $request, Closure $next): Response
{
$host = $request->getHost();
$path = $request->path();
// Theme-Switching über Subdomains
if (str_contains($host, 'b2in.test')) {
config(['app.theme' => 'b2in']);
} elseif (str_contains($host, 'b2a.test')) {
config(['app.theme' => 'b2a']);
} elseif (str_contains($host, 'stileigentum.test')) {
config(['app.theme' => 'stileigentum']);
} elseif (str_contains($host, 'style2own.test')) {
config(['app.theme' => 'style2own']);
}
// Theme-Switching über URL-Parameter (für Testing)
if ($request->has('theme')) {
$theme = $request->get('theme');
if (in_array($theme, ['b2in', 'b2a', 'stileigentum', 'style2own'])) {
config(['app.theme' => $theme]);
}
}
// Theme-Switching über Pfade (für lokale Entwicklung ohne Domain-Setup)
if (str_starts_with($path, 'b2in/')) {
config(['app.theme' => 'b2in']);
$request->server->set('REQUEST_URI', '/' . substr($path, 5)); // Entferne 'b2in/' vom Pfad
} elseif (str_starts_with($path, 'b2a/')) {
config(['app.theme' => 'b2a']);
$request->server->set('REQUEST_URI', '/' . substr($path, 4)); // Entferne 'b2a/' vom Pfad
} elseif (str_starts_with($path, 'stileigentum/')) {
config(['app.theme' => 'stileigentum']);
$request->server->set('REQUEST_URI', '/' . substr($path, 13)); // Entferne 'stileigentum/' vom Pfad
} elseif (str_starts_with($path, 'style2own/')) {
config(['app.theme' => 'style2own']);
$request->server->set('REQUEST_URI', '/' . substr($path, 10)); // Entferne 'style2own/' vom Pfad
}
return $next($request);
}
}

View file

@ -0,0 +1,22 @@
<?php
namespace App\Livewire\Actions;
use Illuminate\Support\Facades\Auth;
use Illuminate\Support\Facades\Session;
class Logout
{
/**
* Log the current user out of the application.
*/
public function __invoke()
{
Auth::guard('web')->logout();
Session::invalidate();
Session::regenerateToken();
return redirect('/');
}
}

View file

@ -0,0 +1,13 @@
<?php
namespace App\Livewire\Web\Components;
use Livewire\Component;
class AboutHero extends Component
{
public function render()
{
return view('livewire.web.components.sections.about-hero');
}
}

View file

@ -0,0 +1,13 @@
<?php
namespace App\Livewire\Web\Components\Demo;
use Livewire\Component;
class ButtonDemo extends Component
{
public function render()
{
return view('livewire.web.components.demo.button-demo');
}
}

View file

@ -0,0 +1,13 @@
<?php
namespace App\Livewire\Web\Components\Demo;
use Livewire\Component;
class ColorDemo extends Component
{
public function render()
{
return view('livewire.web.components.demo.color-demo');
}
}

View file

@ -0,0 +1,24 @@
<?php
namespace App\Livewire\Web\Components\Demo;
use Livewire\Component;
class DemoSection extends Component
{
public $title;
public $description;
public $component;
public function mount($title, $description = null, $component = null)
{
$this->title = $title;
$this->description = $description;
$this->component = $component;
}
public function render()
{
return view('livewire.web.components.demo.demo-section');
}
}

View file

@ -0,0 +1,13 @@
<?php
namespace App\Livewire\Web\Components\Demo;
use Livewire\Component;
class LogoDemo extends Component
{
public function render()
{
return view('livewire.web.components.demo.logo-demo');
}
}

View file

@ -0,0 +1,13 @@
<?php
namespace App\Livewire\Web\Components\Demo;
use Livewire\Component;
class ThemeInfo extends Component
{
public function render()
{
return view('livewire.web.components.demo.theme-info');
}
}

View file

@ -0,0 +1,25 @@
<?php
namespace App\Livewire\Web\Components\Demo;
use Livewire\Component;
class ThemeSwitcher extends Component
{
public $domains = [];
public function mount()
{
$this->domains = config('domains.domains');
foreach ($this->domains as $key => $domain) {
if ($domain['domain_name'] == config('domains.domain_portal')) {
unset($this->domains[$key]);
}
}
}
public function render()
{
return view('livewire.web.components.demo.theme-switcher');
}
}

View file

@ -0,0 +1,21 @@
<?php
namespace App\Livewire\Web\Components\Sections;
use Livewire\Component;
class AboutHero extends Component
{
public $content = [];
public function mount()
{
$theme = config('app.theme', 'b2in');
$this->content = config("content.themes.{$theme}.about_hero", []);
}
public function render()
{
return view('livewire.web.components.sections.about-hero');
}
}

View file

@ -0,0 +1,29 @@
<?php
namespace App\Livewire\Web\Components\Sections;
use Livewire\Component;
class BrandWorlds extends Component
{
public $title;
public $subtitle;
public $worlds = [];
public $bg = 'bg-background';
public function mount($bg = 'bg-background')
{
$theme = config('app.theme', 'b2in');
$content = config("content.themes.{$theme}.brand_worlds");
$this->title = $content['title'] ?? '';
$this->subtitle = $content['subtitle'] ?? '';
$this->worlds = $content['worlds'] ?? [];
$this->bg = $bg;
}
public function render()
{
return view('livewire.web.components.sections.brand-worlds');
}
}

View file

@ -0,0 +1,21 @@
<?php
namespace App\Livewire\Web\Components\Sections;
use Livewire\Component;
class BrokerSection extends Component
{
public $content = [];
public function mount()
{
$theme = config('app.theme', 'b2in');
$this->content = config("content.themes.{$theme}.broker_section", []);
}
public function render()
{
return view('livewire.web.components.sections.broker-section');
}
}

View file

@ -0,0 +1,25 @@
<?php
namespace App\Livewire\Web\Components\Sections;
use Livewire\Component;
class CTASection extends Component
{
public $content = [];
public $bg = '';
public $section = '';
public function mount($bg = 'bg-secondary', $section = 'cta_section')
{
$this->section = $section;
$theme = config('app.theme', 'b2in');
$this->content = config("content.themes.{$theme}.{$this->section}", []);
$this->bg = $bg;
}
public function render()
{
return view('livewire.web.components.sections.c-t-a-section');
}
}

View file

@ -0,0 +1,21 @@
<?php
namespace App\Livewire\Web\Components\Sections;
use Livewire\Component;
class CommitmentSection extends Component
{
public $content = [];
public function mount()
{
$theme = config('app.theme', 'b2in');
$this->content = config("content.themes.{$theme}.commitment_section", []);
}
public function render()
{
return view('livewire.web.components.sections.commitment-section');
}
}

View file

@ -0,0 +1,27 @@
<?php
namespace App\Livewire\Web\Components\Sections;
use Livewire\Component;
class ContentSection extends Component
{
public $content = [];
public $layout = 'left'; // Standard-Layout
public $bg = 'bg-background';
public $section = 'content_section_left';
public function mount($layout = 'left', $bg = 'bg-background', $section = 'content_section')
{
$this->layout = $layout;
$this->bg = $bg;
$this->section = $section;
$theme = config('app.theme', 'b2in');
$this->content = config("content.themes.{$theme}.{$this->section}", []);
}
public function render()
{
return view('livewire.web.components.sections.content-section');
}
}

View file

@ -0,0 +1,21 @@
<?php
namespace App\Livewire\Web\Components\Sections;
use Livewire\Component;
class DarkStatsSection extends Component
{
public $content = [];
public function mount()
{
$theme = config('app.theme', 'b2in');
$this->content = config("content.themes.{$theme}.dark_stats_section", []);
}
public function render()
{
return view('livewire.web.components.sections.dark-stats-section');
}
}

View file

@ -0,0 +1,21 @@
<?php
namespace App\Livewire\Web\Components\Sections;
use Livewire\Component;
class DigitalCore extends Component
{
public $content = [];
public function mount()
{
$theme = config('app.theme', 'b2in');
$this->content = config("content.themes.{$theme}.digital_core", []);
}
public function render()
{
return view('livewire.web.components.sections.digital-core');
}
}

View file

@ -0,0 +1,26 @@
<?php
namespace App\Livewire\Web\Components\Sections;
use Livewire\Component;
class EcosystemCore extends Component
{
public $content = [];
public $bg = 'bg-background';
public $section = 'ecosystem_core';
public function mount($bg = 'bg-background', $section = 'ecosystem_core')
{
$this->bg = $bg;
$this->section = $section;
$theme = config('app.theme', 'b2in');
$this->content = config("content.themes.{$theme}.{$this->section}", []);
}
public function render()
{
return view('livewire.web.components.sections.ecosystem-core');
}
}

View file

@ -0,0 +1,21 @@
<?php
namespace App\Livewire\Web\Components\Sections;
use Livewire\Component;
class EcosystemHero extends Component
{
public $content = [];
public function mount()
{
$theme = config('app.theme', 'b2in');
$this->content = config("content.themes.{$theme}.ecosystem_hero", []);
}
public function render()
{
return view('livewire.web.components.sections.ecosystem-hero');
}
}

View file

@ -0,0 +1,21 @@
<?php
namespace App\Livewire\Web\Components\Sections;
use Livewire\Component;
class EcosystemStats extends Component
{
public $content = [];
public function mount()
{
$theme = config('app.theme', 'b2in');
$this->content = config("content.themes.{$theme}.ecosystem_stats", []);
}
public function render()
{
return view('livewire.web.components.sections.ecosystem-stats');
}
}

View file

@ -0,0 +1,25 @@
<?php
namespace App\Livewire\Web\Components\Sections;
use Livewire\Component;
class EndCustomerSection extends Component
{
public $content = [];
public $bg = '';
public $section = '';
public function mount($bg = 'bg-accent', $section = 'end_customer_section')
{
$theme = config('app.theme', 'b2in');
$this->section = $section;
$this->bg = $bg;
$this->content = config("content.themes.{$theme}.end_customer_section", []);
}
public function render()
{
return view('livewire.web.components.sections.end-customer-section');
}
}

View file

@ -0,0 +1,26 @@
<?php
namespace App\Livewire\Web\Components\Sections;
use Livewire\Component;
class FAQ extends Component
{
public $content = [];
public $bg = '';
public $section = '';
public function mount($bg = 'bg-background', $section = 'faq')
{
$this->bg = $bg;
$this->section = $section;
$theme = config('app.theme', 'b2in');
$this->content = config("content.themes.{$theme}.{$this->section}", []);
}
public function render()
{
return view('livewire.web.components.sections.f-a-q');
}
}

View file

@ -0,0 +1,21 @@
<?php
namespace App\Livewire\Web\Components\Sections;
use Livewire\Component;
class FinalCommitment extends Component
{
public $content = [];
public function mount()
{
$theme = config('app.theme', 'b2in');
$this->content = config("content.themes.{$theme}.final_commitment", []);
}
public function render()
{
return view('livewire.web.components.sections.final-commitment');
}
}

View file

@ -0,0 +1,21 @@
<?php
namespace App\Livewire\Web\Components\Sections;
use Livewire\Component;
class Hero extends Component
{
public $content = [];
public function mount()
{
$theme = config('app.theme', 'b2in');
$this->content = config("content.themes.{$theme}.hero", []);
}
public function render()
{
return view('livewire.web.components.sections.hero');
}
}

View file

@ -0,0 +1,21 @@
<?php
namespace App\Livewire\Web\Components\Sections;
use Livewire\Component;
class HeroImage extends Component
{
public $content = [];
public function mount()
{
$theme = config('app.theme', 'b2in');
$this->content = config("content.themes.{$theme}.hero_image", []);
}
public function render()
{
return view('livewire.web.components.sections.hero-image');
}
}

View file

@ -0,0 +1,44 @@
<?php
namespace App\Livewire\Web\Components\Sections;
use Livewire\Component;
class HeroSlider extends Component
{
public $content = [];
public $currentSlide = 0;
public function mount()
{
$theme = config('app.theme', 'b2in');
$this->content = config("content.themes.{$theme}.hero_slider", []);
}
public function nextSlide()
{
if (!empty($this->content['slides'])) {
$this->currentSlide = ($this->currentSlide + 1) % count($this->content['slides']);
}
}
public function previousSlide()
{
if (!empty($this->content['slides'])) {
$totalSlides = count($this->content['slides']);
$this->currentSlide = ($this->currentSlide - 1 + $totalSlides) % $totalSlides;
}
}
public function setSlide($index)
{
if (!empty($this->content['slides']) && $index >= 0 && $index < count($this->content['slides'])) {
$this->currentSlide = $index;
}
}
public function render()
{
return view('livewire.web.components.sections.hero-slider');
}
}

View file

@ -0,0 +1,21 @@
<?php
namespace App\Livewire\Web\Components\Sections;
use Livewire\Component;
class HeroTiles extends Component
{
public $content = [];
public function mount()
{
$theme = config('app.theme', 'b2in');
$this->content = config("content.themes.{$theme}.hero_tiles", []);
}
public function render()
{
return view('livewire.web.components.sections.hero-tiles');
}
}

View file

@ -0,0 +1,21 @@
<?php
namespace App\Livewire\Web\Components\Sections;
use Livewire\Component;
class LeadershipTeam extends Component
{
public $content = [];
public function mount()
{
$theme = config('app.theme', 'b2in');
$this->content = config("content.themes.{$theme}.leadership_team", []);
}
public function render()
{
return view('livewire.web.components.sections.leadership-team');
}
}

View file

@ -0,0 +1,56 @@
<?php
namespace App\Livewire\Web\Components\Sections;
use Livewire\Component;
class MagazinDetail extends Component
{
public $articleId;
public $article;
public $relatedArticles;
public $content;
public function mount($id = 1)
{
$this->articleId = (int) $id;
$this->loadArticle();
$this->loadRelatedArticles();
$this->loadThemeContent();
}
private function loadArticle()
{
$articles = $this->getArticlesData();
$this->article = $articles[$this->articleId] ?? $articles[1];
}
private function loadRelatedArticles()
{
$articles = $this->getArticlesData();
$this->relatedArticles = collect($articles)
->filter(fn($article, $key) => $key != $this->articleId)
->take(2)
->values()
->toArray();
}
private function loadThemeContent()
{
$theme = config('app.theme', 'b2in');
$this->content = config("content.themes.{$theme}.magazin_detail", []);
}
private function getArticlesData()
{
return config('content.articles', []);
}
public function render()
{
return view('livewire.web.components.sections.magazin-detail', [
'article' => $this->article,
'relatedArticles' => $this->relatedArticles
]);
}
}

View file

@ -0,0 +1,43 @@
<?php
namespace App\Livewire\Web\Components\Sections;
use Livewire\Component;
class MagazinList extends Component
{
public $posts = [];
public $content = [];
public function mount()
{
$this->loadPosts();
$this->loadThemeContent();
}
private function loadPosts()
{
$articles = config('content.articles', []);
$this->posts = collect($articles)->map(function ($article) {
return [
'id' => $article['id'],
'title' => $article['title'],
'excerpt' => $article['content']['intro'], // Using intro as excerpt
'image' => $article['image'],
'date' => $article['date'],
'readTime' => $article['readTime'],
];
})->all();
}
private function loadThemeContent()
{
$theme = config('app.theme', 'b2in');
$this->content = config("content.themes.{$theme}.magazin_list", []);
}
public function render()
{
return view('livewire.web.components.sections.magazin-list');
}
}

View file

@ -0,0 +1,21 @@
<?php
namespace App\Livewire\Web\Components\Sections;
use Livewire\Component;
class OurStory extends Component
{
public $content = [];
public function mount()
{
$theme = config('app.theme', 'b2in');
$this->content = config("content.themes.{$theme}.our_story", []);
}
public function render()
{
return view('livewire.web.components.sections.our-story');
}
}

View file

@ -0,0 +1,21 @@
<?php
namespace App\Livewire\Web\Components\Sections;
use Livewire\Component;
class OurValues extends Component
{
public $content = [];
public function mount()
{
$theme = config('app.theme', 'b2in');
$this->content = config("content.themes.{$theme}.our_values", []);
}
public function render()
{
return view('livewire.web.components.sections.our-values');
}
}

View file

@ -0,0 +1,21 @@
<?php
namespace App\Livewire\Web\Components\Sections;
use Livewire\Component;
class PartnerBenefits extends Component
{
public $content = [];
public function mount()
{
$theme = config('app.theme', 'b2in');
$this->content = config("content.themes.{$theme}.partner_benefits", []);
}
public function render()
{
return view('livewire.web.components.sections.partner-benefits');
}
}

View file

@ -0,0 +1,25 @@
<?php
namespace App\Livewire\Web\Components\Sections;
use Livewire\Component;
class PartnerCTA extends Component
{
public $content = [];
public $bg = '';
public $section = '';
public function mount($bg = 'bg-secondary', $section = 'partner_cta')
{
$this->section = $section;
$theme = config('app.theme', 'b2in');
$this->content = config("content.themes.{$theme}.{$this->section}", []);
$this->bg = $bg;
}
public function render()
{
return view('livewire.web.components.sections.partner-c-t-a');
}
}

View file

@ -0,0 +1,45 @@
<?php
namespace App\Livewire\Web\Components\Sections;
use Livewire\Component;
class PartnerHero extends Component
{
public $partnerTypes = [
[
'title' => 'Makler',
'description' => 'Lifetime-Vergütung',
'icon' => 'trending-up',
],
[
'title' => 'Lieferanten',
'description' => 'Globale Märkte',
'icon' => 'globe',
],
[
'title' => 'Partnership',
'description' => 'Faire Konditionen',
'icon' => 'handshake',
],
[
'title' => 'Erfolg',
'description' => 'Nachhaltiges Wachstum',
'icon' => 'award',
],
];
public $content = [];
public function mount()
{
$theme = config('app.theme', 'b2in');
$this->content = config("content.themes.{$theme}.partner_hero", []);
}
public function render()
{
return view('livewire.web.components.sections.partner-hero', [
'partnerTypes' => $this->partnerTypes
]);
}
}

View file

@ -0,0 +1,21 @@
<?php
namespace App\Livewire\Web\Components\Sections;
use Livewire\Component;
class PartnerProcess extends Component
{
public $content = [];
public function mount()
{
$theme = config('app.theme', 'b2in');
$this->content = config("content.themes.{$theme}.partner_process", []);
}
public function render()
{
return view('livewire.web.components.sections.partner-process');
}
}

View file

@ -0,0 +1,66 @@
<?php
namespace App\Livewire\Web\Components\Sections;
use Livewire\Component;
class Portfolio extends Component
{
public string $activeFilter = 'alle';
public ?array $selectedProject = null;
public bool $showModal = false;
public $content = [];
public $theme = '';
public $filters = [];
public function mount()
{
$filters = [
'alle' => 'Alle',
'villen' => 'Villen',
'penthouse' => 'Penthouse',
'loft' => 'Loft'
];
$this->filters = $filters;
$this->activeFilter = 'alle';
$this->theme = config('app.theme', 'b2in');
$this->content = config("content.themes.{$this->theme}.portfolio", []);
$this->filters = config("content.themes.{$this->theme}.portfolio.filters", $filters);
}
public function filterBy(string $category): void
{
$this->activeFilter = $category;
}
public function openModal(array $project): void
{
$this->selectedProject = $project;
$this->showModal = true;
}
public function closeModal(): void
{
$this->showModal = false;
$this->selectedProject = null;
}
public function getFilteredProjects(): array
{
$projects = config("content.themes.{$this->theme}.portfolio.projects", []);
if ($this->activeFilter === 'alle') {
return $projects;
}
return array_filter($projects, function ($project) {
return strtolower($project['category']) === strtolower($this->activeFilter);
});
}
public function render()
{
return view('livewire.web.components.sections.portfolio');
}
}

View file

@ -0,0 +1,21 @@
<?php
namespace App\Livewire\Web\Components\Sections;
use Livewire\Component;
class SpotlightsSection extends Component
{
public $content = [];
public function mount()
{
$theme = config('app.theme', 'b2in');
$this->content = config("content.themes.{$theme}.spotlights_section", []);
}
public function render()
{
return view('livewire.web.components.sections.spotlights-section');
}
}

View file

@ -0,0 +1,21 @@
<?php
namespace App\Livewire\Web\Components\Sections;
use Livewire\Component;
class SupplierSection extends Component
{
public $content = [];
public function mount()
{
$theme = config('app.theme', 'b2in');
$this->content = config("content.themes.{$theme}.supplier_section", []);
}
public function render()
{
return view('livewire.web.components.sections.supplier-section');
}
}

View file

@ -0,0 +1,23 @@
<?php
namespace App\Livewire\Web\Components\Sections;
use Livewire\Component;
class VisionSection extends Component
{
public $content = [];
public $bg = 'bg-background';
public function mount($bg = 'bg-background')
{
$this->bg = $bg;
$theme = config('app.theme', 'b2in');
$this->content = config("content.themes.{$theme}.vision_section", []);
}
public function render()
{
return view('livewire.web.components.sections.vision-section');
}
}

View file

@ -0,0 +1,65 @@
<?php
namespace App\Livewire\Web\Components\Ui;
use Livewire\Component;
class ContactForm extends Component
{
public $firstName = '';
public $lastName = '';
public $company = '';
public $email = '';
public $phone = '';
public $subject = '';
public $message = '';
public $content = [];
public function mount()
{
$theme = config('app.theme', 'b2in');
$this->content = config("content.themes.{$theme}.contact_form", []);
}
public function getSubjectsProperty()
{
return $this->content['form']['subjects'] ?? [];
}
public function getContactInfoProperty()
{
return $this->content['contact_info'] ?? [];
}
public function getSocialMediaProperty()
{
return $this->content['social_media']['platforms'] ?? [];
}
public function submit()
{
$this->validate([
'firstName' => 'required|string|max:255',
'lastName' => 'required|string|max:255',
'email' => 'required|email|max:255',
'subject' => 'required|string',
'message' => 'required|string|max:2000',
'company' => 'nullable|string|max:255',
'phone' => 'nullable|string|max:255',
]);
// Here you would typically save to database or send email
// For now, we'll just show a success message
$successMessage = $this->content['form']['success_message'] ?? 'Vielen Dank für Ihre Nachricht! Wir werden uns schnellstmöglich bei Ihnen melden.';
session()->flash('message', $successMessage);
$this->reset(['firstName', 'lastName', 'company', 'email', 'phone', 'subject', 'message']);
}
public function render()
{
return view('livewire.web.components.ui.contact-form');
}
}

View file

@ -0,0 +1,13 @@
<?php
namespace App\Livewire\Web\Components\Ui;
use Livewire\Component;
class Footer extends Component
{
public function render()
{
return view('livewire.web.components.ui.footer');
}
}

View file

@ -0,0 +1,57 @@
<?php
namespace App\Livewire\Web\Components\Ui;
use Livewire\Component;
class Header extends Component
{
public $isMobileMenuOpen = false;
public $domainName;
public $domainUrl;
public $content = [];
public function mount()
{
$this->domainName = \App\Helpers\ThemeHelper::getDomainName();
$this->domainUrl = \App\Helpers\ThemeHelper::getDomainUrl();
$theme = config('app.theme', 'b2in');
$this->content = config("content.themes.{$theme}.header", []);
}
public function toggleMobileMenu()
{
$this->isMobileMenuOpen = ! $this->isMobileMenuOpen;
}
public function closeMobileMenu()
{
$this->isMobileMenuOpen = false;
}
public function isActiveRoute($url)
{
$currentPath = request()->path();
$currentPath = '/' . ltrim($currentPath, '/');
// Exact match
if ($currentPath === $url) {
return true;
}
// Special handling for home route
if ($url === '/' && ($currentPath === '/' || $currentPath === '')) {
return true;
}
// Check if current path starts with the navigation URL (for sub-pages)
if ($url !== '/' && str_starts_with($currentPath, rtrim($url, '/'))) {
return true;
}
return false;
}
public function render()
{
return view('livewire.web.components.ui.header');
}
}

View file

@ -0,0 +1,62 @@
<?php
namespace App\Livewire\Web\Components\Ui;
use Livewire\Component;
use Illuminate\Support\Facades\Log;
class TopBar extends Component
{
public $currentLocale;
public $availableLocales = [
'de' => 'Deutsch',
'en' => 'English',
//'fr' => 'Français',
//'es' => 'Español',
];
public $localeFlags = [
'de' => '🇩🇪',
'en' => '🇬🇧',
];
public $domainName;
public function mount()
{
Log::info('Mounting TopBar');
$sessionLocale = session('locale');
if ($sessionLocale && array_key_exists($sessionLocale, $this->availableLocales)) {
app()->setLocale($sessionLocale);
$this->currentLocale = $sessionLocale;
} else {
$this->currentLocale = app()->getLocale();
}
$this->domainName = \App\Helpers\ThemeHelper::getDomainName();
}
public function switchLanguage($locale)
{
Log::info('Switching language to: ' . $locale);
if (array_key_exists($locale, $this->availableLocales)) {
app()->setLocale($locale);
session(['locale' => $locale]);
$this->currentLocale = $locale;
Log::info('Language switched successfully to: ' . $locale);
// Wichtig: In Livewire zeigt request()->url() auf /livewire/update.
// Für einen Seiten-Reload müssen wir den Browser-Referer nutzen.
$referer = request()->header('Referer') ?? '/';
return redirect()->to($referer);
}
Log::warning('Invalid locale attempted: ' . $locale);
}
public function render()
{
return view('livewire.web.components.ui.top-bar');
}
}

63
app/Models/User.php Normal file
View file

@ -0,0 +1,63 @@
<?php
namespace App\Models;
// use Illuminate\Contracts\Auth\MustVerifyEmail;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Foundation\Auth\User as Authenticatable;
use Illuminate\Notifications\Notifiable;
use Illuminate\Support\Str;
use Laravel\Fortify\TwoFactorAuthenticatable;
use Laravel\Sanctum\HasApiTokens;
use Spatie\Permission\Traits\HasRoles;
class User extends Authenticatable
{
/** @use HasFactory<\Database\Factories\UserFactory> */
use HasApiTokens, HasFactory, HasRoles, Notifiable, TwoFactorAuthenticatable;
/**
* The attributes that are mass assignable.
*
* @var list<string>
*/
protected $fillable = [
'name',
'email',
'password',
];
/**
* The attributes that should be hidden for serialization.
*
* @var list<string>
*/
protected $hidden = [
'password',
'remember_token',
];
/**
* Get the attributes that should be cast.
*
* @return array<string, string>
*/
protected function casts(): array
{
return [
'email_verified_at' => 'datetime',
'password' => 'hashed',
];
}
/**
* Get the user's initials
*/
public function initials(): string
{
return Str::of($this->name)
->explode(' ')
->map(fn (string $name) => Str::of($name)->substr(0, 1))
->implode('');
}
}

View file

@ -0,0 +1,24 @@
<?php
namespace App\Providers;
use Illuminate\Support\ServiceProvider;
class AppServiceProvider extends ServiceProvider
{
/**
* Register any application services.
*/
public function register(): void
{
//
}
/**
* Bootstrap any application services.
*/
public function boot(): void
{
//
}
}

View file

@ -0,0 +1,52 @@
<?php
namespace App\Providers;
use App\Actions\Fortify\CreateNewUser;
use App\Actions\Fortify\ResetUserPassword;
use App\Actions\Fortify\UpdateUserPassword;
use App\Actions\Fortify\UpdateUserProfileInformation;
use Illuminate\Cache\RateLimiting\Limit;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\RateLimiter;
use Illuminate\Support\ServiceProvider;
use Illuminate\Support\Str;
use Laravel\Fortify\Actions\RedirectIfTwoFactorAuthenticatable;
use Laravel\Fortify\Fortify;
use Livewire\Volt\Volt;
class FortifyServiceProvider extends ServiceProvider
{
/**
* Register any application services.
*/
public function register(): void
{
//
}
/**
* Bootstrap any application services.
*/
public function boot(): void
{
// Nur die notwendigen Fortify-Aktionen behalten
Fortify::createUsersUsing(CreateNewUser::class);
Fortify::updateUserProfileInformationUsing(UpdateUserProfileInformation::class);
Fortify::updateUserPasswordsUsing(UpdateUserPassword::class);
Fortify::resetUserPasswordsUsing(ResetUserPassword::class);
Fortify::redirectUserForTwoFactorAuthenticationUsing(RedirectIfTwoFactorAuthenticatable::class);
// Keine View-Definitionen, da wir Volt verwenden
RateLimiter::for('login', function (Request $request) {
$throttleKey = Str::transliterate(Str::lower($request->input(Fortify::username())).'|'.$request->ip());
return Limit::perMinute(5)->by($throttleKey);
});
RateLimiter::for('two-factor', function (Request $request) {
return Limit::perMinute(5)->by($request->session()->get('login.id'));
});
}
}

View file

@ -0,0 +1,77 @@
<?php
namespace App\Providers;
use Illuminate\Support\Facades\Request;
use Illuminate\Support\Facades\View;
use Illuminate\Support\Facades\Vite;
use Illuminate\Support\ServiceProvider;
class ThemeServiceProvider extends ServiceProvider
{
/**
* Register services.
*/
public function register(): void
{
// Registriere die domains.php Konfigurationsdatei
$this->mergeConfigFrom(
base_path('config/domains.php'),
'domains'
);
}
/**
* Bootstrap services.
*/
public function boot(): void
{
$host = Request::getHost(); // is domain_name
$themeOverride = Request::get('theme'); // Allow theme override via URL parameter
// Standard-Werte für Domain, die nicht in der Konfiguration sind
$domainConfig = [
'name' => config('app.name'),
'theme' => 'b2in',
'view_prefix' => 'b2in',
'assets_dir' => 'build/b2in',
'url' => config('app.url'),
'domain_name' => config('app.domain_name'),
];
// Lade die Domain-Konfiguration
$confiDomains = config('domains.domains');
// Suche nach der aktuellen Domain in der Konfiguration
foreach ($confiDomains as $name => $config) {
if (is_array($config) && isset($config['domain_name']) && $config['domain_name'] === $host) {
$domainConfig = array_merge($domainConfig, $config);
break;
}
}
// Allow theme override via URL parameter (for testing)
if ($themeOverride && isset($confiDomains[$themeOverride])) {
$domainConfig = array_merge($domainConfig, $confiDomains[$themeOverride]);
}
// Grundlegende Konfiguration im Anwendungskontext verfügbar machen
config([
'app.theme' => $domainConfig['theme'],
'app.view_prefix' => $domainConfig['view_prefix'],
'app.domain_name' => $domainConfig['domain_name'],
'app.url' => $domainConfig['url'],
]);
// Spezifischere Daten für die Views verfügbar machen
View::share('theme', $domainConfig['theme']);
View::share('viewPrefix', $domainConfig['view_prefix']);
View::share('domainName', $domainConfig['domain_name']);
View::share('domainConfig', $domainConfig);
View::share('domainUrl', $domainConfig['url']);
// Vite-Assets-Konfiguration für die aktuelle Domain
if (! app()->runningInConsole() && isset($domainConfig['assets_dir'])) {
Vite::useBuildDirectory($domainConfig['assets_dir']);
}
}
}

View file

@ -0,0 +1,28 @@
<?php
namespace App\Providers;
use Illuminate\Support\ServiceProvider;
use Livewire\Volt\Volt;
class VoltServiceProvider extends ServiceProvider
{
/**
* Register services.
*/
public function register(): void
{
//
}
/**
* Bootstrap services.
*/
public function boot(): void
{
Volt::mount([
config('livewire.view_path', resource_path('views/livewire')),
resource_path('views/pages'),
]);
}
}

18
artisan Executable file
View file

@ -0,0 +1,18 @@
#!/usr/bin/env php
<?php
use Illuminate\Foundation\Application;
use Symfony\Component\Console\Input\ArgvInput;
define('LARAVEL_START', microtime(true));
// Register the Composer autoloader...
require __DIR__.'/vendor/autoload.php';
// Bootstrap Laravel and handle the command...
/** @var Application $app */
$app = require_once __DIR__.'/bootstrap/app.php';
$status = $app->handleCommand(new ArgvInput);
exit($status);

8
b2in.code-workspace Normal file
View file

@ -0,0 +1,8 @@
{
"name": "B2in [Dev Container]",
"folders": [
{
"path": "."
}
]
}

20
bootstrap/app.php Normal file
View file

@ -0,0 +1,20 @@
<?php
use Illuminate\Foundation\Application;
use Illuminate\Foundation\Configuration\Exceptions;
use Illuminate\Foundation\Configuration\Middleware;
return Application::configure(basePath: dirname(__DIR__))
->withRouting(
web: __DIR__ . '/../routes/domains.php',
commands: __DIR__ . '/../routes/console.php',
health: '/up',
)
->withMiddleware(function (Middleware $middleware) {
if (env('BASIC_AUTH_ENABLED', true)) {
$middleware->web(\App\Http\Middleware\BasicAuthMiddleware::class);
}
})
->withExceptions(function (Exceptions $exceptions) {
//
})->create();

2
bootstrap/cache/.gitignore vendored Executable file
View file

@ -0,0 +1,2 @@
*
!.gitignore

9
bootstrap/providers.php Normal file
View file

@ -0,0 +1,9 @@
<?php
return [
App\Providers\AppServiceProvider::class,
App\Providers\FortifyServiceProvider::class,
App\Providers\ThemeServiceProvider::class,
App\Providers\VoltServiceProvider::class,
Barryvdh\Debugbar\ServiceProvider::class,
];

100
composer.json Normal file
View file

@ -0,0 +1,100 @@
{
"$schema": "https://getcomposer.org/schema.json",
"name": "laravel/livewire-starter-kit",
"type": "project",
"description": "The official Laravel starter kit for Livewire.",
"keywords": [
"laravel",
"framework"
],
"license": "MIT",
"require": {
"php": "^8.2",
"laravel/fortify": "^1.27",
"laravel/framework": "^12.0",
"laravel/sanctum": "^4.1",
"laravel/tinker": "^2.10.1",
"livewire/flux": "^2.1.1",
"livewire/flux-pro": "^2.1",
"livewire/volt": "^1.7.0",
"spatie/laravel-permission": "^6.17"
},
"require-dev": {
"barryvdh/laravel-debugbar": "^3.16",
"fakerphp/faker": "^1.23.1",
"laravel/dusk": "^8.2",
"laravel/pail": "^1.2.2",
"laravel/pint": "^1.18",
"laravel/sail": "^1.41",
"mockery/mockery": "^1.6",
"nunomaduro/collision": "^8.8",
"orchestra/testbench": "^10.6",
"pestphp/pest": "^3.8",
"pestphp/pest-plugin-laravel": "^3.2",
"phpunit/phpunit": "^11.5",
"reliese/laravel": "^1.4"
},
"autoload": {
"psr-4": {
"App\\": "app/",
"Database\\Factories\\": "database/factories/",
"Database\\Seeders\\": "database/seeders/"
}
},
"autoload-dev": {
"psr-4": {
"Tests\\": "tests/"
}
},
"scripts": {
"post-autoload-dump": [
"Illuminate\\Foundation\\ComposerScripts::postAutoloadDump",
"@php artisan package:discover --ansi"
],
"post-update-cmd": [
"@php artisan vendor:publish --tag=laravel-assets --ansi --force"
],
"post-root-package-install": [
"@php -r \"file_exists('.env') || copy('.env.example', '.env');\""
],
"post-create-project-cmd": [
"@php artisan key:generate --ansi",
"@php -r \"file_exists('database/database.sqlite') || touch('database/database.sqlite');\"",
"@php artisan migrate --graceful --ansi"
],
"dev": [
"Composer\\Config::disableProcessTimeout",
"npx concurrently -c \"#93c5fd,#c4b5fd,#fb7185,#fdba74\" \"php artisan serve\" \"php artisan queue:listen --tries=1\" \"php artisan pail --timeout=0\" \"npm run dev\" --names=server,queue,logs,vite"
],
"test": [
"@php artisan config:clear --ansi",
"@php artisan test"
]
},
"extra": {
"laravel": {
"dont-discover": []
}
},
"config": {
"optimize-autoloader": true,
"preferred-install": "dist",
"sort-packages": true,
"allow-plugins": {
"pestphp/pest-plugin": true,
"php-http/discovery": true
}
},
"minimum-stability": "dev",
"prefer-stable": true,
"repositories": [
{
"type": "path",
"url": "packages/*/*"
},
{
"type": "composer",
"url": "https://composer.fluxui.dev"
}
]
}

11055
composer.lock generated Normal file

File diff suppressed because it is too large Load diff

127
config/app.php Normal file
View file

@ -0,0 +1,127 @@
<?php
return [
/*
|--------------------------------------------------------------------------
| Application Name
|--------------------------------------------------------------------------
|
| This value is the name of your application, which will be used when the
| framework needs to place the application's name in a notification or
| other UI elements where an application name needs to be displayed.
|
*/
'name' => env('APP_NAME', 'Laravel'),
/*
|--------------------------------------------------------------------------
| Application Environment
|--------------------------------------------------------------------------
|
| This value determines the "environment" your application is currently
| running in. This may determine how you prefer to configure various
| services the application utilizes. Set this in your ".env" file.
|
*/
'env' => env('APP_ENV', 'production'),
/*
|--------------------------------------------------------------------------
| Application Debug Mode
|--------------------------------------------------------------------------
|
| When your application is in debug mode, detailed error messages with
| stack traces will be shown on every error that occurs within your
| application. If disabled, a simple generic error page is shown.
|
*/
'debug' => (bool) env('APP_DEBUG', false),
/*
|--------------------------------------------------------------------------
| Application URL
|--------------------------------------------------------------------------
|
| This URL is used by the console to properly generate URLs when using
| the Artisan command line tool. You should set this to the root of
| the application so that it's available within Artisan commands.
|
*/
'url' => env('APP_URL', 'https://localhost'),
'domain_name' => env('APP_DOMAIN_NAME', 'localhost'),
/*
|--------------------------------------------------------------------------
| Application Timezone
|--------------------------------------------------------------------------
|
| Here you may specify the default timezone for your application, which
| will be used by the PHP date and date-time functions. The timezone
| is set to "UTC" by default as it is suitable for most use cases.
|
*/
'timezone' => 'UTC',
/*
|--------------------------------------------------------------------------
| Application Locale Configuration
|--------------------------------------------------------------------------
|
| The application locale determines the default locale that will be used
| by Laravel's translation / localization methods. This option can be
| set to any locale for which you plan to have translation strings.
|
*/
'locale' => env('APP_LOCALE', 'en'),
'fallback_locale' => env('APP_FALLBACK_LOCALE', 'en'),
'faker_locale' => env('APP_FAKER_LOCALE', 'en_US'),
/*
|--------------------------------------------------------------------------
| Encryption Key
|--------------------------------------------------------------------------
|
| This key is utilized by Laravel's encryption services and should be set
| to a random, 32 character string to ensure that all encrypted values
| are secure. You should do this prior to deploying the application.
|
*/
'cipher' => 'AES-256-CBC',
'key' => env('APP_KEY'),
'previous_keys' => [
...array_filter(
explode(',', env('APP_PREVIOUS_KEYS', ''))
),
],
/*
|--------------------------------------------------------------------------
| Maintenance Mode Driver
|--------------------------------------------------------------------------
|
| These configuration options determine the driver used to determine and
| manage Laravel's "maintenance mode" status. The "cache" driver will
| allow maintenance mode to be controlled across multiple machines.
|
| Supported drivers: "file", "cache"
|
*/
'maintenance' => [
'driver' => env('APP_MAINTENANCE_DRIVER', 'file'),
'store' => env('APP_MAINTENANCE_STORE', 'database'),
],
];

122
config/auth.php Normal file
View file

@ -0,0 +1,122 @@
<?php
use App\Models\User;
return [
/*
|--------------------------------------------------------------------------
| Authentication Defaults
|--------------------------------------------------------------------------
|
| This option defines the default authentication "guard" and password
| reset "broker" for your application. You may change these values
| as required, but they're a perfect start for most applications.
|
*/
'defaults' => [
'guard' => env('AUTH_GUARD', 'web'),
'passwords' => env('AUTH_PASSWORD_BROKER', 'users'),
],
/*
|--------------------------------------------------------------------------
| Authentication Guards
|--------------------------------------------------------------------------
|
| Next, you may define every authentication guard for your application.
| Of course, a great default configuration has been defined for you
| which utilizes session storage plus the Eloquent user provider.
|
| All authentication guards have a user provider, which defines how the
| users are actually retrieved out of your database or other storage
| system used by the application. Typically, Eloquent is utilized.
|
| Supported: "session"
|
*/
'guards' => [
'web' => [
'driver' => 'session',
'provider' => 'users',
],
],
/*
|--------------------------------------------------------------------------
| User Providers
|--------------------------------------------------------------------------
|
| All authentication guards have a user provider, which defines how the
| users are actually retrieved out of your database or other storage
| system used by the application. Typically, Eloquent is utilized.
|
| If you have multiple user tables or models you may configure multiple
| providers to represent the model / table. These providers may then
| be assigned to any extra authentication guards you have defined.
|
| Supported: "database", "eloquent"
|
*/
'providers' => [
'users' => [
'driver' => 'eloquent',
'model' => env('AUTH_MODEL', User::class),
],
// 'users' => [
// 'driver' => 'database',
// 'table' => 'users',
// ],
],
/*
|--------------------------------------------------------------------------
| Resetting Passwords
|--------------------------------------------------------------------------
|
| These configuration options specify the behavior of Laravel's password
| reset functionality, including the table utilized for token storage
| and the user provider that is invoked to actually retrieve users.
|
| The expiry time is the number of minutes that each reset token will be
| considered valid. This security feature keeps tokens short-lived so
| they have less time to be guessed. You may change this as needed.
|
| The throttle setting is the number of seconds a user must wait before
| generating more password reset tokens. This prevents the user from
| quickly generating a very large amount of password reset tokens.
|
*/
'passwords' => [
'users' => [
'provider' => 'users',
'table' => env('AUTH_PASSWORD_RESET_TOKEN_TABLE', 'password_reset_tokens'),
'expire' => 60,
'throttle' => 60,
],
],
/*
|--------------------------------------------------------------------------
| Password Confirmation Timeout
|--------------------------------------------------------------------------
|
| Here you may define the amount of seconds before a password confirmation
| window expires and users are asked to re-enter their password via the
| confirmation screen. By default, the timeout lasts for three hours.
|
*/
'password_timeout' => env('AUTH_PASSWORD_TIMEOUT', 10800),
'basic' => [
'user' => env('BASIC_AUTH_USER'),
'password' => env('BASIC_AUTH_PASSWORD'),
],
];

108
config/cache.php Normal file
View file

@ -0,0 +1,108 @@
<?php
use Illuminate\Support\Str;
return [
/*
|--------------------------------------------------------------------------
| Default Cache Store
|--------------------------------------------------------------------------
|
| This option controls the default cache store that will be used by the
| framework. This connection is utilized if another isn't explicitly
| specified when running a cache operation inside the application.
|
*/
'default' => env('CACHE_STORE', 'database'),
/*
|--------------------------------------------------------------------------
| Cache Stores
|--------------------------------------------------------------------------
|
| Here you may define all of the cache "stores" for your application as
| well as their drivers. You may even define multiple stores for the
| same cache driver to group types of items stored in your caches.
|
| Supported drivers: "array", "database", "file", "memcached",
| "redis", "dynamodb", "octane", "null"
|
*/
'stores' => [
'array' => [
'driver' => 'array',
'serialize' => false,
],
'database' => [
'driver' => 'database',
'connection' => env('DB_CACHE_CONNECTION'),
'table' => env('DB_CACHE_TABLE', 'cache'),
'lock_connection' => env('DB_CACHE_LOCK_CONNECTION'),
'lock_table' => env('DB_CACHE_LOCK_TABLE'),
],
'file' => [
'driver' => 'file',
'path' => storage_path('framework/cache/data'),
'lock_path' => storage_path('framework/cache/data'),
],
'memcached' => [
'driver' => 'memcached',
'persistent_id' => env('MEMCACHED_PERSISTENT_ID'),
'sasl' => [
env('MEMCACHED_USERNAME'),
env('MEMCACHED_PASSWORD'),
],
'options' => [
// Memcached::OPT_CONNECT_TIMEOUT => 2000,
],
'servers' => [
[
'host' => env('MEMCACHED_HOST', '127.0.0.1'),
'port' => env('MEMCACHED_PORT', 11211),
'weight' => 100,
],
],
],
'redis' => [
'driver' => 'redis',
'connection' => env('REDIS_CACHE_CONNECTION', 'cache'),
'lock_connection' => env('REDIS_CACHE_LOCK_CONNECTION', 'default'),
],
'dynamodb' => [
'driver' => 'dynamodb',
'key' => env('AWS_ACCESS_KEY_ID'),
'secret' => env('AWS_SECRET_ACCESS_KEY'),
'region' => env('AWS_DEFAULT_REGION', 'us-east-1'),
'table' => env('DYNAMODB_CACHE_TABLE', 'cache'),
'endpoint' => env('DYNAMODB_ENDPOINT'),
],
'octane' => [
'driver' => 'octane',
],
],
/*
|--------------------------------------------------------------------------
| Cache Key Prefix
|--------------------------------------------------------------------------
|
| When utilizing the APC, database, memcached, Redis, and DynamoDB cache
| stores, there might be other applications using the same cache. For
| that reason, you may prefix every cache key to avoid collisions.
|
*/
'prefix' => env('CACHE_PREFIX', Str::slug(env('APP_NAME', 'laravel'), '_').'_cache_'),
];

2124
config/content.php Normal file

File diff suppressed because it is too large Load diff

174
config/database.php Normal file
View file

@ -0,0 +1,174 @@
<?php
use Illuminate\Support\Str;
return [
/*
|--------------------------------------------------------------------------
| Default Database Connection Name
|--------------------------------------------------------------------------
|
| Here you may specify which of the database connections below you wish
| to use as your default connection for database operations. This is
| the connection which will be utilized unless another connection
| is explicitly specified when you execute a query / statement.
|
*/
'default' => env('DB_CONNECTION', 'sqlite'),
/*
|--------------------------------------------------------------------------
| Database Connections
|--------------------------------------------------------------------------
|
| Below are all of the database connections defined for your application.
| An example configuration is provided for each database system which
| is supported by Laravel. You're free to add / remove connections.
|
*/
'connections' => [
'sqlite' => [
'driver' => 'sqlite',
'url' => env('DB_URL'),
'database' => env('DB_DATABASE', database_path('database.sqlite')),
'prefix' => '',
'foreign_key_constraints' => env('DB_FOREIGN_KEYS', true),
'busy_timeout' => null,
'journal_mode' => null,
'synchronous' => null,
],
'mysql' => [
'driver' => 'mysql',
'url' => env('DB_URL'),
'host' => env('DB_HOST', '127.0.0.1'),
'port' => env('DB_PORT', '3306'),
'database' => env('DB_DATABASE', 'laravel'),
'username' => env('DB_USERNAME', 'root'),
'password' => env('DB_PASSWORD', ''),
'unix_socket' => env('DB_SOCKET', ''),
'charset' => env('DB_CHARSET', 'utf8mb4'),
'collation' => env('DB_COLLATION', 'utf8mb4_unicode_ci'),
'prefix' => '',
'prefix_indexes' => true,
'strict' => true,
'engine' => null,
'options' => extension_loaded('pdo_mysql') ? array_filter([
PDO::MYSQL_ATTR_SSL_CA => env('MYSQL_ATTR_SSL_CA'),
]) : [],
],
'mariadb' => [
'driver' => 'mariadb',
'url' => env('DB_URL'),
'host' => env('DB_HOST', '127.0.0.1'),
'port' => env('DB_PORT', '3306'),
'database' => env('DB_DATABASE', 'laravel'),
'username' => env('DB_USERNAME', 'root'),
'password' => env('DB_PASSWORD', ''),
'unix_socket' => env('DB_SOCKET', ''),
'charset' => env('DB_CHARSET', 'utf8mb4'),
'collation' => env('DB_COLLATION', 'utf8mb4_unicode_ci'),
'prefix' => '',
'prefix_indexes' => true,
'strict' => true,
'engine' => null,
'options' => extension_loaded('pdo_mysql') ? array_filter([
PDO::MYSQL_ATTR_SSL_CA => env('MYSQL_ATTR_SSL_CA'),
]) : [],
],
'pgsql' => [
'driver' => 'pgsql',
'url' => env('DB_URL'),
'host' => env('DB_HOST', '127.0.0.1'),
'port' => env('DB_PORT', '5432'),
'database' => env('DB_DATABASE', 'laravel'),
'username' => env('DB_USERNAME', 'root'),
'password' => env('DB_PASSWORD', ''),
'charset' => env('DB_CHARSET', 'utf8'),
'prefix' => '',
'prefix_indexes' => true,
'search_path' => 'public',
'sslmode' => 'prefer',
],
'sqlsrv' => [
'driver' => 'sqlsrv',
'url' => env('DB_URL'),
'host' => env('DB_HOST', 'localhost'),
'port' => env('DB_PORT', '1433'),
'database' => env('DB_DATABASE', 'laravel'),
'username' => env('DB_USERNAME', 'root'),
'password' => env('DB_PASSWORD', ''),
'charset' => env('DB_CHARSET', 'utf8'),
'prefix' => '',
'prefix_indexes' => true,
// 'encrypt' => env('DB_ENCRYPT', 'yes'),
// 'trust_server_certificate' => env('DB_TRUST_SERVER_CERTIFICATE', 'false'),
],
],
/*
|--------------------------------------------------------------------------
| Migration Repository Table
|--------------------------------------------------------------------------
|
| This table keeps track of all the migrations that have already run for
| your application. Using this information, we can determine which of
| the migrations on disk haven't actually been run on the database.
|
*/
'migrations' => [
'table' => 'migrations',
'update_date_on_publish' => true,
],
/*
|--------------------------------------------------------------------------
| Redis Databases
|--------------------------------------------------------------------------
|
| Redis is an open source, fast, and advanced key-value store that also
| provides a richer body of commands than a typical key-value system
| such as Memcached. You may define your connection settings here.
|
*/
'redis' => [
'client' => env('REDIS_CLIENT', 'phpredis'),
'options' => [
'cluster' => env('REDIS_CLUSTER', 'redis'),
'prefix' => env('REDIS_PREFIX', Str::slug(env('APP_NAME', 'laravel'), '_').'_database_'),
'persistent' => env('REDIS_PERSISTENT', false),
],
'default' => [
'url' => env('REDIS_URL'),
'host' => env('REDIS_HOST', '127.0.0.1'),
'username' => env('REDIS_USERNAME'),
'password' => env('REDIS_PASSWORD'),
'port' => env('REDIS_PORT', '6379'),
'database' => env('REDIS_DB', '0'),
],
'cache' => [
'url' => env('REDIS_URL'),
'host' => env('REDIS_HOST', '127.0.0.1'),
'username' => env('REDIS_USERNAME'),
'password' => env('REDIS_PASSWORD'),
'port' => env('REDIS_PORT', '6379'),
'database' => env('REDIS_CACHE_DB', '1'),
],
],
];

113
config/domains.php Normal file
View file

@ -0,0 +1,113 @@
<?php
return [
/*
|--------------------------------------------------------------------------
| Domain-Konfigurationen
|--------------------------------------------------------------------------
|
| Diese Konfiguration definiert die verschiedenen Domains und deren
| zugehörige Einstellungen wie Theme, View-Präfix und andere
| domainspezifische Konfigurationen.
|
| Die Domains können in der .env-Datei definiert werden:
| https://portal.b2in.test //Backend Admin User Backend
| https://b2in.test //Frontend B2in Main Page
| https://b2a.test //Frontend B2A Secondary Page
| https://stileigentum.test //Frontend Stileigentum Landingpage
| https://style2own.test //Frontend Style2own Landingpage
|
*/
'protocol' => env('APP_PROTOCOL', 'https://'),
'domain_portal' => env('DOMAIN_PORTAL', 'portal.b2in.test'),
'domain_b2in' => env('DOMAIN_B2IN', 'b2in.test'),
'domain_b2a' => env('DOMAIN_B2A', 'b2a.test'),
'domain_stileigentum' => env('DOMAIN_STILEIGENTUM', 'stileigentum.test'),
'domain_style2own' => env('DOMAIN_STYLE2OWN', 'style2own.test'),
'domain_portal_url' => env('DOMAIN_PORTAL_URL', 'https://portal.b2in.test'),
'domain_b2in_url' => env('DOMAIN_B2IN_URL', 'https://b2in.test'),
'domain_b2a_url' => env('DOMAIN_B2A_URL', 'https://b2a.test'),
'domain_stileigentum_url' => env('DOMAIN_STILEIGENTUM_URL', 'https://stileigentum.test'),
'domain_style2own_url' => env('DOMAIN_STYLE2OWN_URL', 'https://style2own.test'),
'domains' => [
'portal' => [
'domain_name' => env('DOMAIN_PORTAL', 'portal.b2in.test'),
'url' => env('DOMAIN_PORTAL_URL', 'https://portal.b2in.test'),
'theme' => 'portal',
'view_prefix' => 'portal',
'assets_dir' => 'build/portal',
'description' => 'Portal-Bereich mit Login und Dashboard',
],
'b2in' => [
'domain_name' => env('DOMAIN_B2IN', 'b2in.test'),
'url' => env('DOMAIN_B2IN_URL', 'https://b2in.test'),
'theme' => 'b2in',
'view_prefix' => 'b2in',
'assets_dir' => 'build/b2in',
'description' => 'Haupt-Landingpage mit Standard-Theme',
'color_scheme' => [
'primary' => '#2b3f51', // Anthracite
'secondary' => '#20a0da', // Dynamic Blue
],
'font_family' => [
'primary' => 'Inter',
'secondary' => 'IBM Plex Sans',
],
],
'b2a' => [
'domain_name' => env('DOMAIN_B2A', 'b2a.test'),
'url' => env('DOMAIN_B2A_URL', 'https://b2a.test'),
'theme' => 'b2a',
'view_prefix' => 'b2a',
'assets_dir' => 'build/b2a',
'description' => 'B2A-Landingpage mit Theme',
'color_scheme' => [
'primary' => '#123f6d', // Azur Blue
'accent' => '#ce1d2e', // Liberty Red
],
'font_family' => [
'primary' => 'Inter',
'secondary' => 'Merriweather',
],
],
'stileigentum' => [
'domain_name' => env('DOMAIN_STILEIGENTUM', 'stileigentum.test'),
'url' => env('DOMAIN_STILEIGENTUM_URL', 'https://stileigentum.test'),
'theme' => 'stileigentum',
'view_prefix' => 'stileigentum',
'assets_dir' => 'build/stileigentum',
'description' => 'Stileigentum-Landingpage mit Theme',
'color_scheme' => [
'primary' => '#123453', // Imperial Blue
'secondary' => '#c9ac84', // Sand Gold
],
'font_family' => [
'primary' => 'Inter',
'secondary' => 'EB Garamond',
],
],
'style2own' => [
'domain_name' => env('DOMAIN_STYLE2OWN', 'style2own.test'),
'url' => env('DOMAIN_STYLE2OWN_URL', 'https://style2own.test'),
'theme' => 'style2own',
'view_prefix' => 'style2own',
'assets_dir' => 'build/style2own',
'description' => 'Style2own-Landingpage mit Theme',
'color_scheme' => [
'primary' => '#007aab', // Style Blue
'secondary' => '#fbaf22', // Style Sun
],
'font_family' => [
'primary' => 'Inter',
'secondary' => 'Ephesis',
],
],
],
];

80
config/filesystems.php Normal file
View file

@ -0,0 +1,80 @@
<?php
return [
/*
|--------------------------------------------------------------------------
| Default Filesystem Disk
|--------------------------------------------------------------------------
|
| Here you may specify the default filesystem disk that should be used
| by the framework. The "local" disk, as well as a variety of cloud
| based disks are available to your application for file storage.
|
*/
'default' => env('FILESYSTEM_DISK', 'local'),
/*
|--------------------------------------------------------------------------
| Filesystem Disks
|--------------------------------------------------------------------------
|
| Below you may configure as many filesystem disks as necessary, and you
| may even configure multiple disks for the same driver. Examples for
| most supported storage drivers are configured here for reference.
|
| Supported drivers: "local", "ftp", "sftp", "s3"
|
*/
'disks' => [
'local' => [
'driver' => 'local',
'root' => storage_path('app/private'),
'serve' => true,
'throw' => false,
'report' => false,
],
'public' => [
'driver' => 'local',
'root' => storage_path('app/public'),
'url' => env('APP_URL').'/storage',
'visibility' => 'public',
'throw' => false,
'report' => false,
],
's3' => [
'driver' => 's3',
'key' => env('AWS_ACCESS_KEY_ID'),
'secret' => env('AWS_SECRET_ACCESS_KEY'),
'region' => env('AWS_DEFAULT_REGION'),
'bucket' => env('AWS_BUCKET'),
'url' => env('AWS_URL'),
'endpoint' => env('AWS_ENDPOINT'),
'use_path_style_endpoint' => env('AWS_USE_PATH_STYLE_ENDPOINT', false),
'throw' => false,
'report' => false,
],
],
/*
|--------------------------------------------------------------------------
| Symbolic Links
|--------------------------------------------------------------------------
|
| Here you may configure the symbolic links that will be created when the
| `storage:link` Artisan command is executed. The array keys should be
| the locations of the links and the values should be their targets.
|
*/
'links' => [
public_path('storage') => storage_path('app/public'),
],
];

159
config/fortify.php Normal file
View file

@ -0,0 +1,159 @@
<?php
use Laravel\Fortify\Features;
return [
/*
|--------------------------------------------------------------------------
| Fortify Guard
|--------------------------------------------------------------------------
|
| Here you may specify which authentication guard Fortify will use while
| authenticating users. This value should correspond with one of your
| guards that is already present in your "auth" configuration file.
|
*/
'guard' => 'web',
/*
|--------------------------------------------------------------------------
| Fortify Password Broker
|--------------------------------------------------------------------------
|
| Here you may specify which password broker Fortify can use when a user
| is resetting their password. This configured value should match one
| of your password brokers setup in your "auth" configuration file.
|
*/
'passwords' => 'users',
/*
|--------------------------------------------------------------------------
| Username / Email
|--------------------------------------------------------------------------
|
| This value defines which model attribute should be considered as your
| application's "username" field. Typically, this might be the email
| address of the users but you are free to change this value here.
|
| Out of the box, Fortify expects forgot password and reset password
| requests to have a field named 'email'. If the application uses
| another name for the field you may define it below as needed.
|
*/
'username' => 'email',
'email' => 'email',
/*
|--------------------------------------------------------------------------
| Lowercase Usernames
|--------------------------------------------------------------------------
|
| This value defines whether usernames should be lowercased before saving
| them in the database, as some database system string fields are case
| sensitive. You may disable this for your application if necessary.
|
*/
'lowercase_usernames' => true,
/*
|--------------------------------------------------------------------------
| Home Path
|--------------------------------------------------------------------------
|
| Here you may configure the path where users will get redirected during
| authentication or password reset when the operations are successful
| and the user is authenticated. You are free to change this value.
|
*/
'home' => '/dashboard',
/*
|--------------------------------------------------------------------------
| Fortify Routes Prefix / Subdomain
|--------------------------------------------------------------------------
|
| Here you may specify which prefix Fortify will assign to all the routes
| that it registers with the application. If necessary, you may change
| subdomain under which all of the Fortify routes will be available.
|
*/
'prefix' => '',
'domain' => null,
/*
|--------------------------------------------------------------------------
| Fortify Routes Middleware
|--------------------------------------------------------------------------
|
| Here you may specify which middleware Fortify will assign to the routes
| that it registers with the application. If necessary, you may change
| these middleware but typically this provided default is preferred.
|
*/
'middleware' => ['web'],
/*
|--------------------------------------------------------------------------
| Rate Limiting
|--------------------------------------------------------------------------
|
| By default, Fortify will throttle logins to five requests per minute for
| every email and IP address combination. However, if you would like to
| specify a custom rate limiter to call then you may specify it here.
|
*/
'limiters' => [
'login' => 'login',
'two-factor' => 'two-factor',
],
/*
|--------------------------------------------------------------------------
| Register View Routes
|--------------------------------------------------------------------------
|
| Here you may specify if the routes returning views should be disabled as
| you may not need them when building your own application. This may be
| especially true if you're writing a custom single-page application.
|
*/
'views' => false,
/*
|--------------------------------------------------------------------------
| Features
|--------------------------------------------------------------------------
|
| Some of the Fortify features are optional. You may disable the features
| by removing them from this array. You're free to only remove some of
| these features or you can even remove all of these if you need to.
|
*/
'features' => [
// Features::registration(), // Deaktiviert, da wir Volt verwenden
// Features::resetPasswords(), // Deaktiviert, da wir Volt verwenden
// Features::emailVerification(),
Features::updateProfileInformation(),
Features::updatePasswords(),
Features::twoFactorAuthentication([
'confirm' => true,
'confirmPassword' => true,
// 'window' => 0,
]),
],
];

160
config/livewire.php Normal file
View file

@ -0,0 +1,160 @@
<?php
return [
/*
|---------------------------------------------------------------------------
| Class Namespace
|---------------------------------------------------------------------------
|
| This value sets the root class namespace for Livewire component classes in
| your application. This value will change where component auto-discovery
| finds components. It's also referenced by the file creation commands.
|
*/
'class_namespace' => 'App\\Livewire',
/*
|---------------------------------------------------------------------------
| View Path
|---------------------------------------------------------------------------
|
| This value is used to specify where Livewire component Blade templates are
| stored when running file creation commands like `artisan make:livewire`.
| It is also used if you choose to omit a component's render() method.
|
*/
'view_path' => resource_path('views/livewire'),
/*
|---------------------------------------------------------------------------
| Layout
|---------------------------------------------------------------------------
| The view that will be used as the layout when rendering a single component
| as an entire page via `Route::get('/post/create', CreatePost::class);`.
| In this case, the view returned by CreatePost will render into $slot.
|
*/
'layout' => 'components.layouts.auth',
/*
|---------------------------------------------------------------------------
| Lazy Loading Placeholder
|---------------------------------------------------------------------------
| Livewire allows you to lazy load components that would otherwise slow down
| the initial page load. Every component can have a custom placeholder or
| you can define the default placeholder view for all components below.
|
*/
'lazy_placeholder' => null,
/*
|---------------------------------------------------------------------------
| Temporary File Uploads
|---------------------------------------------------------------------------
|
| Livewire handles file uploads by storing uploads in a temporary directory
| before the file is stored permanently. All file uploads are directed to
| a global endpoint for temporary storage. You may configure this below:
|
*/
'temporary_file_upload' => [
'disk' => null, // Example: 'local', 's3' | Default: 'default'
'rules' => null, // Example: ['file', 'mimes:png,jpg'] | Default: ['required', 'file', 'max:12288'] (12MB)
'directory' => null, // Example: 'tmp' | Default: 'livewire-tmp'
'middleware' => null, // Example: 'throttle:5,1' | Default: 'throttle:60,1'
'preview_mimes' => [ // Supported file types for temporary pre-signed file URLs...
'png', 'gif', 'bmp', 'svg', 'wav', 'mp4',
'mov', 'avi', 'wmv', 'mp3', 'm4a',
'jpg', 'jpeg', 'mpga', 'webp', 'wma',
],
'max_upload_time' => 5, // Max duration (in minutes) before an upload is invalidated...
'cleanup' => true, // Should cleanup temporary uploads older than 24 hrs...
],
/*
|---------------------------------------------------------------------------
| Render On Redirect
|---------------------------------------------------------------------------
|
| This value determines if Livewire will run a component's `render()` method
| after a redirect has been triggered using something like `redirect(...)`
| Setting this to true will render the view once more before redirecting
|
*/
'render_on_redirect' => false,
/*
|---------------------------------------------------------------------------
| Eloquent Model Binding
|---------------------------------------------------------------------------
|
| Previous versions of Livewire supported binding directly to eloquent model
| properties using wire:model by default. However, this behavior has been
| deemed too "magical" and has therefore been put under a feature flag.
|
*/
'legacy_model_binding' => false,
/*
|---------------------------------------------------------------------------
| Auto-inject Frontend Assets
|---------------------------------------------------------------------------
|
| By default, Livewire automatically injects its JavaScript and CSS into the
| <head> and <body> of pages containing Livewire components. By disabling
| this behavior, you need to use @livewireStyles and @livewireScripts.
|
*/
'inject_assets' => true,
/*
|---------------------------------------------------------------------------
| Navigate (SPA mode)
|---------------------------------------------------------------------------
|
| By adding `wire:navigate` to links in your Livewire application, Livewire
| will prevent the default link handling and instead request those pages
| via AJAX, creating an SPA-like effect. Configure this behavior here.
|
*/
'navigate' => [
'show_progress_bar' => true,
'progress_bar_color' => '#2299dd',
],
/*
|---------------------------------------------------------------------------
| HTML Morph Markers
|---------------------------------------------------------------------------
|
| Livewire intelligently "morphs" existing HTML into the newly rendered HTML
| after each update. To make this process more reliable, Livewire injects
| "markers" into the rendered Blade surrounding @if, @class & @foreach.
|
*/
'inject_morph_markers' => true,
/*
|---------------------------------------------------------------------------
| Pagination Theme
|---------------------------------------------------------------------------
|
| When enabling Livewire's pagination feature by using the `WithPagination`
| trait, Livewire will use Tailwind templates to render pagination views
| on the page. If you want Bootstrap CSS, you can specify: "bootstrap"
|
*/
'pagination_theme' => 'tailwind',
];

132
config/logging.php Normal file
View file

@ -0,0 +1,132 @@
<?php
use Monolog\Handler\NullHandler;
use Monolog\Handler\StreamHandler;
use Monolog\Handler\SyslogUdpHandler;
use Monolog\Processor\PsrLogMessageProcessor;
return [
/*
|--------------------------------------------------------------------------
| Default Log Channel
|--------------------------------------------------------------------------
|
| This option defines the default log channel that is utilized to write
| messages to your logs. The value provided here should match one of
| the channels present in the list of "channels" configured below.
|
*/
'default' => env('LOG_CHANNEL', 'stack'),
/*
|--------------------------------------------------------------------------
| Deprecations Log Channel
|--------------------------------------------------------------------------
|
| This option controls the log channel that should be used to log warnings
| regarding deprecated PHP and library features. This allows you to get
| your application ready for upcoming major versions of dependencies.
|
*/
'deprecations' => [
'channel' => env('LOG_DEPRECATIONS_CHANNEL', 'null'),
'trace' => env('LOG_DEPRECATIONS_TRACE', false),
],
/*
|--------------------------------------------------------------------------
| Log Channels
|--------------------------------------------------------------------------
|
| Here you may configure the log channels for your application. Laravel
| utilizes the Monolog PHP logging library, which includes a variety
| of powerful log handlers and formatters that you're free to use.
|
| Available drivers: "single", "daily", "slack", "syslog",
| "errorlog", "monolog", "custom", "stack"
|
*/
'channels' => [
'stack' => [
'driver' => 'stack',
'channels' => explode(',', env('LOG_STACK', 'single')),
'ignore_exceptions' => false,
],
'single' => [
'driver' => 'single',
'path' => storage_path('logs/laravel.log'),
'level' => env('LOG_LEVEL', 'debug'),
'replace_placeholders' => true,
],
'daily' => [
'driver' => 'daily',
'path' => storage_path('logs/laravel.log'),
'level' => env('LOG_LEVEL', 'debug'),
'days' => env('LOG_DAILY_DAYS', 14),
'replace_placeholders' => true,
],
'slack' => [
'driver' => 'slack',
'url' => env('LOG_SLACK_WEBHOOK_URL'),
'username' => env('LOG_SLACK_USERNAME', 'Laravel Log'),
'emoji' => env('LOG_SLACK_EMOJI', ':boom:'),
'level' => env('LOG_LEVEL', 'critical'),
'replace_placeholders' => true,
],
'papertrail' => [
'driver' => 'monolog',
'level' => env('LOG_LEVEL', 'debug'),
'handler' => env('LOG_PAPERTRAIL_HANDLER', SyslogUdpHandler::class),
'handler_with' => [
'host' => env('PAPERTRAIL_URL'),
'port' => env('PAPERTRAIL_PORT'),
'connectionString' => 'tls://'.env('PAPERTRAIL_URL').':'.env('PAPERTRAIL_PORT'),
],
'processors' => [PsrLogMessageProcessor::class],
],
'stderr' => [
'driver' => 'monolog',
'level' => env('LOG_LEVEL', 'debug'),
'handler' => StreamHandler::class,
'formatter' => env('LOG_STDERR_FORMATTER'),
'with' => [
'stream' => 'php://stderr',
],
'processors' => [PsrLogMessageProcessor::class],
],
'syslog' => [
'driver' => 'syslog',
'level' => env('LOG_LEVEL', 'debug'),
'facility' => env('LOG_SYSLOG_FACILITY', LOG_USER),
'replace_placeholders' => true,
],
'errorlog' => [
'driver' => 'errorlog',
'level' => env('LOG_LEVEL', 'debug'),
'replace_placeholders' => true,
],
'null' => [
'driver' => 'monolog',
'handler' => NullHandler::class,
],
'emergency' => [
'path' => storage_path('logs/laravel.log'),
],
],
];

116
config/mail.php Normal file
View file

@ -0,0 +1,116 @@
<?php
return [
/*
|--------------------------------------------------------------------------
| Default Mailer
|--------------------------------------------------------------------------
|
| This option controls the default mailer that is used to send all email
| messages unless another mailer is explicitly specified when sending
| the message. All additional mailers can be configured within the
| "mailers" array. Examples of each type of mailer are provided.
|
*/
'default' => env('MAIL_MAILER', 'log'),
/*
|--------------------------------------------------------------------------
| Mailer Configurations
|--------------------------------------------------------------------------
|
| Here you may configure all of the mailers used by your application plus
| their respective settings. Several examples have been configured for
| you and you are free to add your own as your application requires.
|
| Laravel supports a variety of mail "transport" drivers that can be used
| when delivering an email. You may specify which one you're using for
| your mailers below. You may also add additional mailers if needed.
|
| Supported: "smtp", "sendmail", "mailgun", "ses", "ses-v2",
| "postmark", "resend", "log", "array",
| "failover", "roundrobin"
|
*/
'mailers' => [
'smtp' => [
'transport' => 'smtp',
'scheme' => env('MAIL_SCHEME'),
'url' => env('MAIL_URL'),
'host' => env('MAIL_HOST', '127.0.0.1'),
'port' => env('MAIL_PORT', 2525),
'username' => env('MAIL_USERNAME'),
'password' => env('MAIL_PASSWORD'),
'timeout' => null,
'local_domain' => env('MAIL_EHLO_DOMAIN', parse_url(env('APP_URL', 'http://localhost'), PHP_URL_HOST)),
],
'ses' => [
'transport' => 'ses',
],
'postmark' => [
'transport' => 'postmark',
// 'message_stream_id' => env('POSTMARK_MESSAGE_STREAM_ID'),
// 'client' => [
// 'timeout' => 5,
// ],
],
'resend' => [
'transport' => 'resend',
],
'sendmail' => [
'transport' => 'sendmail',
'path' => env('MAIL_SENDMAIL_PATH', '/usr/sbin/sendmail -bs -i'),
],
'log' => [
'transport' => 'log',
'channel' => env('MAIL_LOG_CHANNEL'),
],
'array' => [
'transport' => 'array',
],
'failover' => [
'transport' => 'failover',
'mailers' => [
'smtp',
'log',
],
],
'roundrobin' => [
'transport' => 'roundrobin',
'mailers' => [
'ses',
'postmark',
],
],
],
/*
|--------------------------------------------------------------------------
| Global "From" Address
|--------------------------------------------------------------------------
|
| You may wish for all emails sent by your application to be sent from
| the same address. Here you may specify a name and address that is
| used globally for all emails that are sent by your application.
|
*/
'from' => [
'address' => env('MAIL_FROM_ADDRESS', 'hello@example.com'),
'name' => env('MAIL_FROM_NAME', 'Example'),
],
];

202
config/permission.php Normal file
View file

@ -0,0 +1,202 @@
<?php
return [
'models' => [
/*
* When using the "HasPermissions" trait from this package, we need to know which
* Eloquent model should be used to retrieve your permissions. Of course, it
* is often just the "Permission" model but you may use whatever you like.
*
* The model you want to use as a Permission model needs to implement the
* `Spatie\Permission\Contracts\Permission` contract.
*/
'permission' => Spatie\Permission\Models\Permission::class,
/*
* When using the "HasRoles" trait from this package, we need to know which
* Eloquent model should be used to retrieve your roles. Of course, it
* is often just the "Role" model but you may use whatever you like.
*
* The model you want to use as a Role model needs to implement the
* `Spatie\Permission\Contracts\Role` contract.
*/
'role' => Spatie\Permission\Models\Role::class,
],
'table_names' => [
/*
* When using the "HasRoles" trait from this package, we need to know which
* table should be used to retrieve your roles. We have chosen a basic
* default value but you may easily change it to any table you like.
*/
'roles' => 'roles',
/*
* When using the "HasPermissions" trait from this package, we need to know which
* table should be used to retrieve your permissions. We have chosen a basic
* default value but you may easily change it to any table you like.
*/
'permissions' => 'permissions',
/*
* When using the "HasPermissions" trait from this package, we need to know which
* table should be used to retrieve your models permissions. We have chosen a
* basic default value but you may easily change it to any table you like.
*/
'model_has_permissions' => 'model_has_permissions',
/*
* When using the "HasRoles" trait from this package, we need to know which
* table should be used to retrieve your models roles. We have chosen a
* basic default value but you may easily change it to any table you like.
*/
'model_has_roles' => 'model_has_roles',
/*
* When using the "HasRoles" trait from this package, we need to know which
* table should be used to retrieve your roles permissions. We have chosen a
* basic default value but you may easily change it to any table you like.
*/
'role_has_permissions' => 'role_has_permissions',
],
'column_names' => [
/*
* Change this if you want to name the related pivots other than defaults
*/
'role_pivot_key' => null, // default 'role_id',
'permission_pivot_key' => null, // default 'permission_id',
/*
* Change this if you want to name the related model primary key other than
* `model_id`.
*
* For example, this would be nice if your primary keys are all UUIDs. In
* that case, name this `model_uuid`.
*/
'model_morph_key' => 'model_id',
/*
* Change this if you want to use the teams feature and your related model's
* foreign key is other than `team_id`.
*/
'team_foreign_key' => 'team_id',
],
/*
* When set to true, the method for checking permissions will be registered on the gate.
* Set this to false if you want to implement custom logic for checking permissions.
*/
'register_permission_check_method' => true,
/*
* When set to true, Laravel\Octane\Events\OperationTerminated event listener will be registered
* this will refresh permissions on every TickTerminated, TaskTerminated and RequestTerminated
* NOTE: This should not be needed in most cases, but an Octane/Vapor combination benefited from it.
*/
'register_octane_reset_listener' => false,
/*
* Events will fire when a role or permission is assigned/unassigned:
* \Spatie\Permission\Events\RoleAttached
* \Spatie\Permission\Events\RoleDetached
* \Spatie\Permission\Events\PermissionAttached
* \Spatie\Permission\Events\PermissionDetached
*
* To enable, set to true, and then create listeners to watch these events.
*/
'events_enabled' => false,
/*
* Teams Feature.
* When set to true the package implements teams using the 'team_foreign_key'.
* If you want the migrations to register the 'team_foreign_key', you must
* set this to true before doing the migration.
* If you already did the migration then you must make a new migration to also
* add 'team_foreign_key' to 'roles', 'model_has_roles', and 'model_has_permissions'
* (view the latest version of this package's migration file)
*/
'teams' => false,
/*
* The class to use to resolve the permissions team id
*/
'team_resolver' => \Spatie\Permission\DefaultTeamResolver::class,
/*
* Passport Client Credentials Grant
* When set to true the package will use Passports Client to check permissions
*/
'use_passport_client_credentials' => false,
/*
* When set to true, the required permission names are added to exception messages.
* This could be considered an information leak in some contexts, so the default
* setting is false here for optimum safety.
*/
'display_permission_in_exception' => false,
/*
* When set to true, the required role names are added to exception messages.
* This could be considered an information leak in some contexts, so the default
* setting is false here for optimum safety.
*/
'display_role_in_exception' => false,
/*
* By default wildcard permission lookups are disabled.
* See documentation to understand supported syntax.
*/
'enable_wildcard_permission' => false,
/*
* The class to use for interpreting wildcard permissions.
* If you need to modify delimiters, override the class and specify its name here.
*/
// 'permission.wildcard_permission' => Spatie\Permission\WildcardPermission::class,
/* Cache-specific settings */
'cache' => [
/*
* By default all permissions are cached for 24 hours to speed up performance.
* When permissions or roles are updated the cache is flushed automatically.
*/
'expiration_time' => \DateInterval::createFromDateString('24 hours'),
/*
* The cache key used to store all permissions.
*/
'key' => 'spatie.permission.cache',
/*
* You may optionally indicate a specific cache driver to use for permission and
* role caching using any of the `store` drivers listed in the cache.php config
* file. Using 'default' here means to use the `default` set in cache.php.
*/
'store' => 'default',
],
];

112
config/queue.php Normal file
View file

@ -0,0 +1,112 @@
<?php
return [
/*
|--------------------------------------------------------------------------
| Default Queue Connection Name
|--------------------------------------------------------------------------
|
| Laravel's queue supports a variety of backends via a single, unified
| API, giving you convenient access to each backend using identical
| syntax for each. The default queue connection is defined below.
|
*/
'default' => env('QUEUE_CONNECTION', 'database'),
/*
|--------------------------------------------------------------------------
| Queue Connections
|--------------------------------------------------------------------------
|
| Here you may configure the connection options for every queue backend
| used by your application. An example configuration is provided for
| each backend supported by Laravel. You're also free to add more.
|
| Drivers: "sync", "database", "beanstalkd", "sqs", "redis", "null"
|
*/
'connections' => [
'sync' => [
'driver' => 'sync',
],
'database' => [
'driver' => 'database',
'connection' => env('DB_QUEUE_CONNECTION'),
'table' => env('DB_QUEUE_TABLE', 'jobs'),
'queue' => env('DB_QUEUE', 'default'),
'retry_after' => (int) env('DB_QUEUE_RETRY_AFTER', 90),
'after_commit' => false,
],
'beanstalkd' => [
'driver' => 'beanstalkd',
'host' => env('BEANSTALKD_QUEUE_HOST', 'localhost'),
'queue' => env('BEANSTALKD_QUEUE', 'default'),
'retry_after' => (int) env('BEANSTALKD_QUEUE_RETRY_AFTER', 90),
'block_for' => 0,
'after_commit' => false,
],
'sqs' => [
'driver' => 'sqs',
'key' => env('AWS_ACCESS_KEY_ID'),
'secret' => env('AWS_SECRET_ACCESS_KEY'),
'prefix' => env('SQS_PREFIX', 'https://sqs.us-east-1.amazonaws.com/your-account-id'),
'queue' => env('SQS_QUEUE', 'default'),
'suffix' => env('SQS_SUFFIX'),
'region' => env('AWS_DEFAULT_REGION', 'us-east-1'),
'after_commit' => false,
],
'redis' => [
'driver' => 'redis',
'connection' => env('REDIS_QUEUE_CONNECTION', 'default'),
'queue' => env('REDIS_QUEUE', 'default'),
'retry_after' => (int) env('REDIS_QUEUE_RETRY_AFTER', 90),
'block_for' => null,
'after_commit' => false,
],
],
/*
|--------------------------------------------------------------------------
| Job Batching
|--------------------------------------------------------------------------
|
| The following options configure the database and table that store job
| batching information. These options can be updated to any database
| connection and table which has been defined by your application.
|
*/
'batching' => [
'database' => env('DB_CONNECTION', 'sqlite'),
'table' => 'job_batches',
],
/*
|--------------------------------------------------------------------------
| Failed Queue Jobs
|--------------------------------------------------------------------------
|
| These options configure the behavior of failed queue job logging so you
| can control how and where failed jobs are stored. Laravel ships with
| support for storing failed jobs in a simple file or in a database.
|
| Supported drivers: "database-uuids", "dynamodb", "file", "null"
|
*/
'failed' => [
'driver' => env('QUEUE_FAILED_DRIVER', 'database-uuids'),
'database' => env('DB_CONNECTION', 'sqlite'),
'table' => 'failed_jobs',
],
];

84
config/sanctum.php Normal file
View file

@ -0,0 +1,84 @@
<?php
use Laravel\Sanctum\Sanctum;
return [
/*
|--------------------------------------------------------------------------
| Stateful Domains
|--------------------------------------------------------------------------
|
| Requests from the following domains / hosts will receive stateful API
| authentication cookies. Typically, these should include your local
| and production domains which access your API via a frontend SPA.
|
*/
'stateful' => explode(',', env('SANCTUM_STATEFUL_DOMAINS', sprintf(
'%s%s',
'localhost,localhost:3000,127.0.0.1,127.0.0.1:8000,::1',
Sanctum::currentApplicationUrlWithPort(),
// Sanctum::currentRequestHost(),
))),
/*
|--------------------------------------------------------------------------
| Sanctum Guards
|--------------------------------------------------------------------------
|
| This array contains the authentication guards that will be checked when
| Sanctum is trying to authenticate a request. If none of these guards
| are able to authenticate the request, Sanctum will use the bearer
| token that's present on an incoming request for authentication.
|
*/
'guard' => ['web'],
/*
|--------------------------------------------------------------------------
| Expiration Minutes
|--------------------------------------------------------------------------
|
| This value controls the number of minutes until an issued token will be
| considered expired. This will override any values set in the token's
| "expires_at" attribute, but first-party sessions are not affected.
|
*/
'expiration' => null,
/*
|--------------------------------------------------------------------------
| Token Prefix
|--------------------------------------------------------------------------
|
| Sanctum can prefix new tokens in order to take advantage of numerous
| security scanning initiatives maintained by open source platforms
| that notify developers if they commit tokens into repositories.
|
| See: https://docs.github.com/en/code-security/secret-scanning/about-secret-scanning
|
*/
'token_prefix' => env('SANCTUM_TOKEN_PREFIX', ''),
/*
|--------------------------------------------------------------------------
| Sanctum Middleware
|--------------------------------------------------------------------------
|
| When authenticating your first-party SPA with Sanctum you may need to
| customize some of the middleware Sanctum uses while processing the
| request. You may change the middleware listed below as required.
|
*/
'middleware' => [
'authenticate_session' => Laravel\Sanctum\Http\Middleware\AuthenticateSession::class,
'encrypt_cookies' => Illuminate\Cookie\Middleware\EncryptCookies::class,
'validate_csrf_token' => Illuminate\Foundation\Http\Middleware\ValidateCsrfToken::class,
],
];

38
config/services.php Normal file
View file

@ -0,0 +1,38 @@
<?php
return [
/*
|--------------------------------------------------------------------------
| Third Party Services
|--------------------------------------------------------------------------
|
| This file is for storing the credentials for third party services such
| as Mailgun, Postmark, AWS and more. This file provides the de facto
| location for this type of information, allowing packages to have
| a conventional file to locate the various service credentials.
|
*/
'postmark' => [
'token' => env('POSTMARK_TOKEN'),
],
'ses' => [
'key' => env('AWS_ACCESS_KEY_ID'),
'secret' => env('AWS_SECRET_ACCESS_KEY'),
'region' => env('AWS_DEFAULT_REGION', 'us-east-1'),
],
'resend' => [
'key' => env('RESEND_KEY'),
],
'slack' => [
'notifications' => [
'bot_user_oauth_token' => env('SLACK_BOT_USER_OAUTH_TOKEN'),
'channel' => env('SLACK_BOT_USER_DEFAULT_CHANNEL'),
],
],
];

217
config/session.php Normal file
View file

@ -0,0 +1,217 @@
<?php
use Illuminate\Support\Str;
return [
/*
|--------------------------------------------------------------------------
| Default Session Driver
|--------------------------------------------------------------------------
|
| This option determines the default session driver that is utilized for
| incoming requests. Laravel supports a variety of storage options to
| persist session data. Database storage is a great default choice.
|
| Supported: "file", "cookie", "database", "apc",
| "memcached", "redis", "dynamodb", "array"
|
*/
'driver' => env('SESSION_DRIVER', 'database'),
/*
|--------------------------------------------------------------------------
| Session Lifetime
|--------------------------------------------------------------------------
|
| Here you may specify the number of minutes that you wish the session
| to be allowed to remain idle before it expires. If you want them
| to expire immediately when the browser is closed then you may
| indicate that via the expire_on_close configuration option.
|
*/
'lifetime' => (int) env('SESSION_LIFETIME', 120),
'expire_on_close' => env('SESSION_EXPIRE_ON_CLOSE', false),
/*
|--------------------------------------------------------------------------
| Session Encryption
|--------------------------------------------------------------------------
|
| This option allows you to easily specify that all of your session data
| should be encrypted before it's stored. All encryption is performed
| automatically by Laravel and you may use the session like normal.
|
*/
'encrypt' => env('SESSION_ENCRYPT', false),
/*
|--------------------------------------------------------------------------
| Session File Location
|--------------------------------------------------------------------------
|
| When utilizing the "file" session driver, the session files are placed
| on disk. The default storage location is defined here; however, you
| are free to provide another location where they should be stored.
|
*/
'files' => storage_path('framework/sessions'),
/*
|--------------------------------------------------------------------------
| Session Database Connection
|--------------------------------------------------------------------------
|
| When using the "database" or "redis" session drivers, you may specify a
| connection that should be used to manage these sessions. This should
| correspond to a connection in your database configuration options.
|
*/
'connection' => env('SESSION_CONNECTION'),
/*
|--------------------------------------------------------------------------
| Session Database Table
|--------------------------------------------------------------------------
|
| When using the "database" session driver, you may specify the table to
| be used to store sessions. Of course, a sensible default is defined
| for you; however, you're welcome to change this to another table.
|
*/
'table' => env('SESSION_TABLE', 'sessions'),
/*
|--------------------------------------------------------------------------
| Session Cache Store
|--------------------------------------------------------------------------
|
| When using one of the framework's cache driven session backends, you may
| define the cache store which should be used to store the session data
| between requests. This must match one of your defined cache stores.
|
| Affects: "apc", "dynamodb", "memcached", "redis"
|
*/
'store' => env('SESSION_STORE'),
/*
|--------------------------------------------------------------------------
| Session Sweeping Lottery
|--------------------------------------------------------------------------
|
| Some session drivers must manually sweep their storage location to get
| rid of old sessions from storage. Here are the chances that it will
| happen on a given request. By default, the odds are 2 out of 100.
|
*/
'lottery' => [2, 100],
/*
|--------------------------------------------------------------------------
| Session Cookie Name
|--------------------------------------------------------------------------
|
| Here you may change the name of the session cookie that is created by
| the framework. Typically, you should not need to change this value
| since doing so does not grant a meaningful security improvement.
|
*/
'cookie' => env(
'SESSION_COOKIE',
Str::slug(env('APP_NAME', 'laravel'), '_').'_session'
),
/*
|--------------------------------------------------------------------------
| Session Cookie Path
|--------------------------------------------------------------------------
|
| The session cookie path determines the path for which the cookie will
| be regarded as available. Typically, this will be the root path of
| your application, but you're free to change this when necessary.
|
*/
'path' => env('SESSION_PATH', '/'),
/*
|--------------------------------------------------------------------------
| Session Cookie Domain
|--------------------------------------------------------------------------
|
| This value determines the domain and subdomains the session cookie is
| available to. By default, the cookie will be available to the root
| domain and all subdomains. Typically, this shouldn't be changed.
|
*/
'domain' => env('SESSION_DOMAIN'),
/*
|--------------------------------------------------------------------------
| HTTPS Only Cookies
|--------------------------------------------------------------------------
|
| By setting this option to true, session cookies will only be sent back
| to the server if the browser has a HTTPS connection. This will keep
| the cookie from being sent to you when it can't be done securely.
|
*/
'secure' => env('SESSION_SECURE_COOKIE'),
/*
|--------------------------------------------------------------------------
| HTTP Access Only
|--------------------------------------------------------------------------
|
| Setting this value to true will prevent JavaScript from accessing the
| value of the cookie and the cookie will only be accessible through
| the HTTP protocol. It's unlikely you should disable this option.
|
*/
'http_only' => env('SESSION_HTTP_ONLY', true),
/*
|--------------------------------------------------------------------------
| Same-Site Cookies
|--------------------------------------------------------------------------
|
| This option determines how your cookies behave when cross-site requests
| take place, and can be used to mitigate CSRF attacks. By default, we
| will set this value to "lax" to permit secure cross-site requests.
|
| See: https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Set-Cookie#samesitesamesite-value
|
| Supported: "lax", "strict", "none", null
|
*/
'same_site' => env('SESSION_SAME_SITE', 'lax'),
/*
|--------------------------------------------------------------------------
| Partitioned Cookies
|--------------------------------------------------------------------------
|
| Setting this value to true will tie the cookie to the top-level site for
| a cross-site context. Partitioned cookies are accepted by the browser
| when flagged "secure" and the Same-Site attribute is set to "none".
|
*/
'partitioned' => env('SESSION_PARTITIONED_COOKIE', false),
];

1
database/.gitignore vendored Normal file
View file

@ -0,0 +1 @@
*.sqlite*

View file

@ -0,0 +1,44 @@
<?php
namespace Database\Factories;
use Illuminate\Database\Eloquent\Factories\Factory;
use Illuminate\Support\Facades\Hash;
use Illuminate\Support\Str;
/**
* @extends \Illuminate\Database\Eloquent\Factories\Factory<\App\Models\User>
*/
class UserFactory extends Factory
{
/**
* The current password being used by the factory.
*/
protected static ?string $password;
/**
* Define the model's default state.
*
* @return array<string, mixed>
*/
public function definition(): array
{
return [
'name' => fake()->name(),
'email' => fake()->unique()->safeEmail(),
'email_verified_at' => now(),
'password' => static::$password ??= Hash::make('password'),
'remember_token' => Str::random(10),
];
}
/**
* Indicate that the model's email address should be unverified.
*/
public function unverified(): static
{
return $this->state(fn (array $attributes) => [
'email_verified_at' => null,
]);
}
}

View file

@ -0,0 +1,49 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
return new class extends Migration
{
/**
* Run the migrations.
*/
public function up(): void
{
Schema::create('users', function (Blueprint $table) {
$table->id();
$table->string('name');
$table->string('email')->unique();
$table->timestamp('email_verified_at')->nullable();
$table->string('password');
$table->rememberToken();
$table->timestamps();
});
Schema::create('password_reset_tokens', function (Blueprint $table) {
$table->string('email')->primary();
$table->string('token');
$table->timestamp('created_at')->nullable();
});
Schema::create('sessions', function (Blueprint $table) {
$table->string('id')->primary();
$table->foreignId('user_id')->nullable()->index();
$table->string('ip_address', 45)->nullable();
$table->text('user_agent')->nullable();
$table->longText('payload');
$table->integer('last_activity')->index();
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::dropIfExists('users');
Schema::dropIfExists('password_reset_tokens');
Schema::dropIfExists('sessions');
}
};

Some files were not shown because too many files have changed in this diff Show more