_stefanzweifel’s avatar_stefanzweifel’s Twitter Archive—№ 2,219

    1. 🌶️🔥 You can a pass a redirect() to the abort()-helper. Allows you to immediately redirect to somewhere else in your Laravel app, if you are not in a controller and can't return the redirect.
  1. …in reply to @_stefanzweifel
    ☝️Use this with caution. Placing an abort(redirect()) somewhere in an Action-class, might make it harder to understand how your app works. Best to keep redirects in places where you excpect them to be: Controllers and Middlewares.