cleanup and ensure forgot password functionality is working

This commit is contained in:
Nabeel Shahzad 2017-12-21 17:23:45 -06:00
parent 6c546b5094
commit 7fbe2f5e30
6 changed files with 22 additions and 71 deletions

View File

@ -2,3 +2,4 @@ dnsmasq: /usr/local/sbin/dnsmasq --keep-in-foreground
php-fpm: /usr/local/sbin/php-fpm --nodaemonize
nginx: /usr/local/bin/nginx
mysql: /usr/local/bin/mysqld
mailhog: /usr/local/bin/mailhog

View File

@ -7,31 +7,15 @@ use Illuminate\Foundation\Auth\SendsPasswordResetEmails;
class ForgotPasswordController extends Controller
{
/*
|--------------------------------------------------------------------------
| Password Reset Controller
|--------------------------------------------------------------------------
|
| This controller is responsible for handling password reset emails and
| includes a trait which assists in sending these notifications from
| your application to your users. Feel free to explore this trait.
|
*/
use SendsPasswordResetEmails;
public function __construct()
{
$this->middleware('guest');
}
public function showLinkRequestForm()
{
return $this->view('auth.passwords.email');
}
/**
* Create a new controller instance.
*
* @return void
*/
public function __construct()
{
$this->middleware('guest');
}
}

View File

@ -7,38 +7,17 @@ use Illuminate\Foundation\Auth\AuthenticatesUsers;
class LoginController extends Controller
{
/*
|--------------------------------------------------------------------------
| Login Controller
|--------------------------------------------------------------------------
|
| This controller handles authenticating users for the application and
| redirecting them to your home screen. The controller uses a trait
| to conveniently provide its functionality to your applications.
|
*/
use AuthenticatesUsers;
/**
* Where to redirect users after login / registration.
*
* @var string
*/
protected $redirectTo = '/dashboard';
public function __construct()
{
$this->middleware('guest', ['except' => 'logout']);
}
public function showLoginForm()
{
return $this->view('auth/login');
}
/**
* Create a new controller instance.
*
* @return void
*/
public function __construct()
{
$this->middleware('guest', ['except' => 'logout']);
}
}

View File

@ -23,6 +23,14 @@ class RegisterController extends Controller
protected $userService;
public function __construct(
UserService $userService
) {
$this->userService = $userService;
$this->middleware('guest');
}
public function showRegistrationForm()
{
$airports = Airport::all();
@ -33,19 +41,6 @@ class RegisterController extends Controller
]);
}
/**
* Create a new controller instance.
*
* @return void
*/
public function __construct(
UserService $userService
)
{
$this->userService = $userService;
$this->middleware('guest');
}
/**
* Get a validator for an incoming registration request.
*

View File

@ -2,21 +2,13 @@
namespace App\Http\Controllers\Auth;
use Illuminate\Http\Request;
use App\Http\Controllers\Controller;
use Illuminate\Foundation\Auth\ResetsPasswords;
class ResetPasswordController extends Controller
{
/*
|--------------------------------------------------------------------------
| Password Reset Controller
|--------------------------------------------------------------------------
|
| This controller is responsible for handling password reset requests
| and uses a simple trait to include this behavior. You're free to
| explore this trait and override any methods you wish to tweak.
|
*/
protected $redirectTo = '/login';
use ResetsPasswords;

View File

@ -55,7 +55,7 @@
</div>
<div class="pull-right">
<h6>
<a href="#pablo" class="link">Need Help?</a>
<a href="{{ url('/password/reset') }}" class="link">Forgot Password?</a>
</h6>
</div>
</form>