Skip to content

Instantly share code, notes, and snippets.

@patrickcurl
Created August 11, 2021 23:31
Show Gist options
  • Save patrickcurl/2f028278223032a86325a629433b3254 to your computer and use it in GitHub Desktop.
Save patrickcurl/2f028278223032a86325a629433b3254 to your computer and use it in GitHub Desktop.
Laravel Breeze Tutorial RegisteredUserController Changes
<?php
public function store(Request $request){
$request->validate([
'username' => 'required|string|max:255|unique:users',
'email' => 'required|string|email|max:255|unique:users',
'password' => ['required', 'confirmed', Rules\Password::defaults()],
]);
$user = User::create([
'username' => $request->username,
'email' => $request->email,
'password' => Hash::make($request->password),
]);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment