Last change
on this file since ff9da8b was 0924b6c, checked in by Özkan İliyaz <iliyaz_96@…>, 4 years ago |
initial commit
|
-
Property mode
set to
100644
|
File size:
690 bytes
|
Line | |
---|
1 | <?php
|
---|
2 |
|
---|
3 | namespace App\Http\Controllers\Auth;
|
---|
4 |
|
---|
5 | use App\Http\Requests\Auth\VerifyNewEmailRequest;
|
---|
6 | use App\Models\User;
|
---|
7 | use App\Http\Controllers\Controller;
|
---|
8 |
|
---|
9 | class VerifyNewEmailController extends Controller
|
---|
10 | {
|
---|
11 | public function __construct()
|
---|
12 | {
|
---|
13 | $this->middleware("checkVerifyNewEmail");
|
---|
14 | }
|
---|
15 |
|
---|
16 | public function create($id, $token)
|
---|
17 | {
|
---|
18 | return view("auth.verify")->with([
|
---|
19 | "id" => $id,
|
---|
20 | "token" => $token
|
---|
21 | ]);
|
---|
22 | }
|
---|
23 |
|
---|
24 | public function verify(VerifyNewEmailRequest $request, $id, $token)
|
---|
25 | {
|
---|
26 | $user = User::find($id);
|
---|
27 | $user->is_active = true;
|
---|
28 | $user->save();
|
---|
29 |
|
---|
30 | return redirect()->route("auth.login");
|
---|
31 | }
|
---|
32 | }
|
---|
Note:
See
TracBrowser
for help on using the repository browser.