I need some help, I created a field "activation\_key", which is assigned to each user after registration. How to check now, when a user tries to login if he's activated (activation key =null) or not (showing an error message). This check process should be done BEFORE laravel postLogin() runs. I think I must use middleware before, but no idea about the logic itself, how to tell laravel if check was "true" or "false". All in all I'm not sure, how to get this done...

```
namespace App\Http\Middleware;

use Closure;

class BeforeMiddleware
{
    /**
     * Handle an incoming request.
     *
     * @param  \Illuminate\Http\Request  $request
     * @param  \Closure  $next
     * @return mixed
     */
    public function handle($request, Closure $next)
    {
         if (Auth::user()->activation_key) {
        // then redirect home cause they're not activated
        //return redirect('home');
        //not active ;()
        dd("not active seems ugly :I");
    }

    dd("you're active yay");

    }
}

```

routes:

```
// Authentication routes...
Route::get('auth/login', '***');
Route::post('auth/login', 'Auth\AuthController@postLogin');
Route::get('auth/logout', 'Auth\AuthController@getLogout');

```

All the best;