forge/app/Livewire/Mod/ModerationOptions.php

29 lines
570 B
PHP
Raw Normal View History

2024-10-08 13:15:12 -04:00
<?php
namespace App\Livewire\Mod;
use App\Models\ModeratedModel;
2024-10-08 13:15:12 -04:00
use Livewire\Component;
class ModerationOptions extends Component
{
public ModeratedModel $moderatedObject;
2024-11-23 11:27:10 -05:00
2024-10-08 13:15:12 -04:00
public function render()
{
return view('livewire.mod.moderation-options');
2024-10-08 13:15:12 -04:00
}
2024-11-22 14:28:13 -05:00
public function delete(): void
2024-11-22 14:28:13 -05:00
{
$this->moderatedObject->delete();
$this->js('window.location.reload()');
2024-11-22 14:28:13 -05:00
}
public function toggleDisabled(): void
2024-11-22 14:28:13 -05:00
{
$this->moderatedObject->toggleDisabled();
$this->js('window.location.reload()');
2024-11-22 14:28:13 -05:00
}
2024-10-08 13:15:12 -04:00
}