CodepadME / laravel-tricks

The source code for the Laravel Tricks website
http://laravel-tricks.com
MIT License
966 stars 298 forks source link

Show the login form only for guest users #82

Closed hailtonsilva closed 9 years ago

hailtonsilva commented 9 years ago

I think it's now well formatted..

hailtonsilva commented 9 years ago

Wait on @msurguy... I'm currently checking other stuffs in this controller. I'll commit everything together and make the pull request again ok

msurguy commented 9 years ago

@hailtonsilva looks good!

msurguy commented 9 years ago

@hailtonsilva Thank you!

msurguy commented 9 years ago

Actually I think we need to have another PR for that, the thing is that we already have "return" statement in "redirectIntended" function and "view" function doesn't need a return statement.

Could you please update you code to:

if (Auth::guest()) {
    $this->view('home.login');
}
$this->redirectIntended(route('user.index'));

And I will merge it. Also do the same for the other PR please and test on your local first. Thanks!

hailtonsilva commented 9 years ago

Code was tested locally with laravel 4.2 and it works. But yes, I understand that, I'll remove the return. Thank you.

hailtonsilva commented 9 years ago

Requested changes was made here