22 lines
384 B
PHP
22 lines
384 B
PHP
<?php
|
|
|
|
namespace App\Livewire;
|
|
|
|
use App\Models\User;
|
|
use Livewire\Component;
|
|
|
|
class TenancySwitch extends Component
|
|
{
|
|
public function render()
|
|
{
|
|
return view('livewire.tenancy-switch');
|
|
}
|
|
|
|
public function swop($kammer_id)
|
|
{
|
|
User::find(auth()->user()->id)->update(['kammer_id' => $kammer_id]);
|
|
|
|
$this->js('window.location.reload()');
|
|
}
|
|
}
|