feat(trait): membuat WithUserSelector untuk keperluan input yang ada user nya
This commit is contained in:
parent
80ddbeec8c
commit
fb1f449923
16
app/Traits/WithUserSelector.php
Normal file
16
app/Traits/WithUserSelector.php
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Traits;
|
||||||
|
|
||||||
|
trait WithUserSelector
|
||||||
|
{
|
||||||
|
public function selectAllUsers()
|
||||||
|
{
|
||||||
|
$this->form->user_ids = array_keys($this->users);
|
||||||
|
}
|
||||||
|
|
||||||
|
public function deselectAllUsers()
|
||||||
|
{
|
||||||
|
$this->form->user_ids = [];
|
||||||
|
}
|
||||||
|
}
|
||||||
Loading…
Reference in New Issue
Block a user