Last change
on this file was 0a1fb54, checked in by beratkjufliju <kufliju@…>, 3 years ago |
bug fixes
|
-
Property mode
set to
100644
|
File size:
785 bytes
|
Line | |
---|
1 | <?php
|
---|
2 |
|
---|
3 | namespace App\Http\Controllers\Auth;
|
---|
4 |
|
---|
5 | use App\Helpers\Alert;
|
---|
6 | use App\Http\Requests\Auth\VerifyNewEmailRequest;
|
---|
7 | use App\Models\User;
|
---|
8 | use App\Http\Controllers\Controller;
|
---|
9 |
|
---|
10 | class VerifyNewEmailController extends Controller
|
---|
11 | {
|
---|
12 | public function __construct()
|
---|
13 | {
|
---|
14 | $this->middleware("checkVerifyNewEmail");
|
---|
15 | }
|
---|
16 |
|
---|
17 | public function create($id, $token)
|
---|
18 | {
|
---|
19 | return view("auth.verify_new_email")->with([
|
---|
20 | "id" => $id,
|
---|
21 | "token" => $token
|
---|
22 | ]);
|
---|
23 | }
|
---|
24 |
|
---|
25 | public function verify(VerifyNewEmailRequest $request, $id, $token)
|
---|
26 | {
|
---|
27 | $user = User::find($id);
|
---|
28 | $user->is_active = true;
|
---|
29 | $user->save();
|
---|
30 |
|
---|
31 | Alert::flash("Email address verified successfully");
|
---|
32 |
|
---|
33 | return redirect()->route("auth.login");
|
---|
34 | }
|
---|
35 | }
|
---|
Note:
See
TracBrowser
for help on using the repository browser.