Initial commit: WitShop Laravel Online-Shop
- Laravel 11, Blade, Alpine.js, Tailwind CSS - Produkt- & Kategorieverwaltung mit Varianten - Checkout (Vorkasse + Rechnung), Session-Warenkorb - Admin-Backend (Dashboard, Bestellungen, Kunden, CMS) - DSGVO-konform: Cookie-Consent, Impressum, Widerruf, AGB - PDF-Rechnung via dompdf, SMTP-Mailversand - Kundenverwaltung mit manueller Freischaltung Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,19 @@
|
||||
<?php
|
||||
|
||||
namespace Database\Seeders;
|
||||
|
||||
use App\Models\User;
|
||||
use Illuminate\Database\Seeder;
|
||||
|
||||
class AdminUserSeeder extends Seeder
|
||||
{
|
||||
public function run(): void
|
||||
{
|
||||
User::firstOrCreate(['email' => 'admin@example.de'], [
|
||||
'name' => 'Administrator',
|
||||
'password' => bcrypt('changeme123'),
|
||||
'role' => 'super_admin',
|
||||
'email_verified_at' => now(),
|
||||
]);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
<?php
|
||||
|
||||
namespace Database\Seeders;
|
||||
|
||||
use Illuminate\Database\Seeder;
|
||||
|
||||
class DatabaseSeeder extends Seeder
|
||||
{
|
||||
public function run(): void
|
||||
{
|
||||
$this->call([
|
||||
SettingsSeeder::class,
|
||||
AdminUserSeeder::class,
|
||||
]);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,47 @@
|
||||
<?php
|
||||
|
||||
namespace Database\Seeders;
|
||||
|
||||
use App\Models\Setting;
|
||||
use App\Models\ShippingRate;
|
||||
use Illuminate\Database\Seeder;
|
||||
|
||||
class SettingsSeeder extends Seeder
|
||||
{
|
||||
public function run(): void
|
||||
{
|
||||
$defaults = [
|
||||
'shop_name' => 'Mein Online-Shop',
|
||||
'shop_email' => 'info@example.de',
|
||||
'shop_phone' => '',
|
||||
'shop_address' => '',
|
||||
'shop_owner' => '',
|
||||
'shop_vat_id' => '',
|
||||
'bank_name' => '',
|
||||
'bank_iban' => '',
|
||||
'bank_bic' => '',
|
||||
'invoice_payment_days' => '14',
|
||||
'currency' => 'EUR',
|
||||
'currency_symbol' => '€',
|
||||
'smtp_host' => '',
|
||||
'smtp_port' => '587',
|
||||
'smtp_user' => '',
|
||||
'smtp_password' => '',
|
||||
'smtp_from_name' => 'Mein Online-Shop',
|
||||
'smtp_from_email' => 'noreply@example.de',
|
||||
'cookie_consent' => '1',
|
||||
'google_analytics' => '',
|
||||
];
|
||||
|
||||
foreach ($defaults as $key => $value) {
|
||||
Setting::firstOrCreate(['key' => $key], ['value' => $value]);
|
||||
}
|
||||
|
||||
ShippingRate::firstOrCreate(['name' => 'Standard (Deutschland)'], [
|
||||
'zone' => 'DE',
|
||||
'price' => 4.99,
|
||||
'free_from' => 50.00,
|
||||
'active' => true,
|
||||
]);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user