芝麻web文件管理V1.00
编辑当前文件:/home/qrafawbu/www/vendor/laravel/jetstream/stubs/app/Actions/Fortify/CreateNewUserWithTeams.php
['required', 'string', 'max:255'], 'email' => ['required', 'string', 'email', 'max:255', 'unique:users'], 'password' => $this->passwordRules(), 'terms' => Jetstream::hasTermsAndPrivacyPolicyFeature() ? ['required', 'accepted'] : '', ])->validate(); return DB::transaction(function () use ($input) { return tap(User::create([ 'name' => $input['name'], 'email' => $input['email'], 'password' => Hash::make($input['password']), ]), function (User $user) { $this->createTeam($user); }); }); } /** * Create a personal team for the user. * * @param \App\Models\User $user * @return void */ protected function createTeam(User $user) { $user->ownedTeams()->save(Team::forceCreate([ 'user_id' => $user->id, 'name' => explode(' ', $user->name, 2)[0]."'s Team", 'personal_team' => true, ])); } }