22 lines
520 B
PHP
22 lines
520 B
PHP
<?php
|
|
|
|
namespace App\Services\Userdatas;
|
|
|
|
use App\Models\Userdata;
|
|
|
|
class UserdataDataMutator
|
|
{
|
|
public function setNewUserdata(string $username, string $theme, string $profilepicture): bool
|
|
{
|
|
$userdata = new Userdata();
|
|
$userdata->username = $username;
|
|
$userdata->theme = $theme;
|
|
$userdata->profilepicture = $profilepicture;
|
|
return $userdata->save();
|
|
}
|
|
|
|
public function deleteUserdataByID(int $id)
|
|
{
|
|
return Userdata::where('id', $id)->delete();
|
|
}
|
|
} |