This commit is contained in:
Saeed Vaziry
2023-07-02 12:47:50 +02:00
commit 5c72f12490
825 changed files with 41659 additions and 0 deletions

View File

@ -0,0 +1,35 @@
<?php
namespace App\Http\Livewire\Application;
use App\Actions\Site\UpdateBranch;
use App\Models\Site;
use App\Traits\RefreshComponentOnBroadcast;
use Illuminate\Contracts\View\View;
use Livewire\Component;
class ChangeBranch extends Component
{
use RefreshComponentOnBroadcast;
public Site $site;
public string $branch;
public function mount(): void
{
$this->branch = $this->site->branch;
}
public function change(): void
{
app(UpdateBranch::class)->update($this->site, $this->all());
session()->flash('status', 'updating-branch');
}
public function render(): View
{
return view('livewire.application.change-branch');
}
}