develop
Last change
on this file since 120759b was 7304c7f, checked in by beratkjufliju <kufliju@…>, 3 years ago |
added user authentication, create & forgot password methods and blades
|
-
Property mode
set to
100644
|
File size:
690 bytes
|
Rev | Line | |
---|
[7304c7f] | 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.