feat: initial project setup with Laravel 12 and Filament v4

This commit is contained in:
SajjadMahmoody
2026-04-03 17:25:17 +03:30
parent eca5d74b36
commit 09ee1cb743
324 changed files with 78304 additions and 23 deletions
+46
View File
@@ -0,0 +1,46 @@
<?php
declare(strict_types=1);
namespace App\Livewire;
use App\Services\SyncService;
use Filament\Notifications\Notification;
use Livewire\Component;
class SettingsDropdown extends Component
{
public bool $syncSuccess = false;
public bool $syncFailed = false;
public array $reportLines = [];
public function runSync(): void
{
$service = SyncService::fromConfig();
if (! $service->isConfigured()) {
$this->syncFailed = true;
$this->reportLines = [__('navigation.sync.error_not_configured')];
$this->dispatch('sync-finished', success: false);
return;
}
$result = $service->sync();
$this->reportLines = $result['report'] ?? [];
if ($result['success']) {
$this->syncSuccess = true;
$this->dispatch('sync-finished', success: true);
} else {
$this->syncFailed = true;
$this->dispatch('sync-finished', success: false);
}
}
public function render()
{
return view('livewire.settings-dropdown');
}
}