Stand: SMTP-Test, Admin-Mail-Tab, Notifiable-Fix, Lazy-Quill
- Fix: Notifiable-Trait zum User-Model hinzugefuegt (behebt notify()-500er) - Installer: SMTP-Verbindungstest mit EsmtpTransport + Ueberspringen-Link - Admin: Neuer E-Mail-Tab mit SMTP-Konfiguration + Verbindungstest - Admin: Lazy Quill-Initialisierung (nur sichtbare Locale wird geladen) - Uebersetzungen: 17 neue Mail-Keys in allen 6 Sprachen Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
57
app/Http/Controllers/Admin/LocationController.php
Executable file
57
app/Http/Controllers/Admin/LocationController.php
Executable file
@@ -0,0 +1,57 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Controllers\Admin;
|
||||
|
||||
use App\Http\Controllers\Controller;
|
||||
use App\Models\Location;
|
||||
use Illuminate\Http\RedirectResponse;
|
||||
use Illuminate\Http\Request;
|
||||
use Illuminate\View\View;
|
||||
|
||||
class LocationController extends Controller
|
||||
{
|
||||
public function index(): View
|
||||
{
|
||||
$locations = Location::orderBy('name')->get();
|
||||
|
||||
return view('admin.locations.index', compact('locations'));
|
||||
}
|
||||
|
||||
public function store(Request $request): RedirectResponse
|
||||
{
|
||||
$validated = $request->validate([
|
||||
'name' => ['required', 'string', 'max:255'],
|
||||
'address_text' => ['nullable', 'string', 'max:500'],
|
||||
'location_lat' => ['nullable', 'numeric', 'between:-90,90'],
|
||||
'location_lng' => ['nullable', 'numeric', 'between:-180,180'],
|
||||
]);
|
||||
|
||||
Location::create($validated);
|
||||
|
||||
return redirect()->route('admin.locations.index')
|
||||
->with('success', __('admin.location_created'));
|
||||
}
|
||||
|
||||
public function update(Request $request, Location $location): RedirectResponse
|
||||
{
|
||||
$validated = $request->validate([
|
||||
'name' => ['required', 'string', 'max:255'],
|
||||
'address_text' => ['nullable', 'string', 'max:500'],
|
||||
'location_lat' => ['nullable', 'numeric', 'between:-90,90'],
|
||||
'location_lng' => ['nullable', 'numeric', 'between:-180,180'],
|
||||
]);
|
||||
|
||||
$location->update($validated);
|
||||
|
||||
return redirect()->route('admin.locations.index')
|
||||
->with('success', __('admin.location_updated'));
|
||||
}
|
||||
|
||||
public function destroy(Location $location): RedirectResponse
|
||||
{
|
||||
$location->delete();
|
||||
|
||||
return redirect()->route('admin.locations.index')
|
||||
->with('success', __('admin.location_deleted'));
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user