You've already forked Epicnabbo-Catalogus-Updated-Daily
37 lines
680 B
PHP
37 lines
680 B
PHP
<?php
|
|
|
|
namespace App\Actions;
|
|
|
|
use App\Models\User;
|
|
|
|
class UserActions
|
|
{
|
|
public function updateUsername(User $user, string $username): void
|
|
{
|
|
$user->update([
|
|
'username' => $username,
|
|
]);
|
|
}
|
|
|
|
public function updateEmail(User $user, string $email): void
|
|
{
|
|
$user->update([
|
|
'mail' => $email,
|
|
]);
|
|
}
|
|
|
|
public function updateMotto(User $user, string $motto): void
|
|
{
|
|
$user->update([
|
|
'motto' => $motto,
|
|
]);
|
|
}
|
|
|
|
public function updateField(User $user, string $field, ?string $value): void
|
|
{
|
|
$user->update([
|
|
$field => $value,
|
|
]);
|
|
}
|
|
}
|