mirror of
https://github.com/10h30/Test-Laravel-Eloquent-Basics.git
synced 2026-07-11 10:55:52 +09:00
Task 4 - get or create a record
This commit is contained in:
@@ -25,4 +25,13 @@ class UserController extends Controller
|
||||
|
||||
return view('users.show', compact('user'));
|
||||
}
|
||||
|
||||
public function check_create($name, $email)
|
||||
{
|
||||
// TASK: find a user by $name and $email
|
||||
// if not found, create a user with $name, $email and random password
|
||||
$user = NULL;
|
||||
|
||||
return view('users.show', compact('user'));
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user