Esempio n. 1
0
 /**
  * Handle an incoming request.
  *
  * @param  \Illuminate\Http\Request  $request
  * @param  \Closure  $next
  * @return mixed
  */
 public function handle($request, Closure $next)
 {
     if (auth()->guest() || $this->shouldPassThrough($request)) {
         return $next($request);
     }
     if (auth()->user()->email === null) {
         Notification::warning(trans('email::email.must_fill_email'));
         return redirect(config('email.redirect'));
     }
     return $next($request);
 }
Esempio n. 2
0
 /**
  * Handle an incoming request.
  *
  * @param  \Illuminate\Http\Request  $request
  * @param  \Closure  $next
  * @return mixed
  */
 public function handle($request, Closure $next)
 {
     if (auth()->guest() || $this->shouldPassThrough($request)) {
         return $next($request);
     }
     if (auth()->user()->passwordMustBeChanged(config('password.duration'))) {
         Notification::warning(trans('password::password.must_change_password'));
         return redirect(config('password.redirect'));
     }
     return $next($request);
 }
Esempio n. 3
0
 public function destroy($id)
 {
     $this->repository->delete($id);
     Notification::warning('User berhasil dihapus');
     return redirect(route('admin.users.index'));
 }