Redirect if 404

Posted 1 year ago by Waldemar

Hello! I create middleware for backend sub.domain i want if 404 error on backend redirect to frontend Please help some one! Sorry for my English

    public function handle($request, Closure $next)
        if(\Auth::user() && \Auth::user()->admin == 1)
            return $next($request);

        return redirect(\Config::get('app.front_url'));

Please sign in or create an account to participate in this conversation.