This commit is contained in:
2023-03-08 09:16:04 +08:00
commit e78454540f
1318 changed files with 210569 additions and 0 deletions

View File

@@ -0,0 +1,27 @@
<?php
namespace Modules\User\Http\Controllers\Admin\Actions;
use Encore\Admin\Actions\Response;
use Encore\Admin\Actions\RowAction;
use Modules\User\Models\User;
class UserStatusRefund extends RowAction
{
public $name = '已退费';
public function handle(User $user): Response
{
try {
$user->update([
'status' => User::STATUS_REFUND
]);
return $this->response()->success('设置成功')->refresh();
} catch (\Exception $exception) {
return $this->response()->error($exception->getMessage())->refresh();
}
}
}