source: app/Http/Controllers/Auth/VerifyNewEmailController.php@ 68694d4

develop
Last change on this file since 68694d4 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
RevLine 
[7304c7f]1<?php
2
3namespace App\Http\Controllers\Auth;
4
5use App\Http\Requests\Auth\VerifyNewEmailRequest;
6use App\Models\User;
7use App\Http\Controllers\Controller;
8
9class 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.