mirror of
https://github.com/crivion/laranode.git
synced 2026-05-07 06:01:28 +08:00
21 lines
406 B
PHP
21 lines
406 B
PHP
<?php
|
|
|
|
namespace App\Actions\Accounts;
|
|
|
|
use App\Models\User;
|
|
use Illuminate\Auth\Events\Registered;
|
|
|
|
class CreateAccountAction
|
|
{
|
|
public function execute(array $validated): void
|
|
{
|
|
$user = User::create($validated);
|
|
|
|
event(new Registered($user));
|
|
|
|
if ($validated['notify']) {
|
|
\Illuminate\Support\Facades\Log::info('Would notify ' . $user->email);
|
|
}
|
|
}
|
|
}
|