'Invalid URL', 'errors' => [] ]; /* * Use the host name to set the active DB **/ if ($request->getSchemeAndHttpHost() && config('ninja.db.multi_db_enabled') && ! MultiDB::findAndSetDbByInvitation($request->route('entity'), $request->route('invitation_key'))) { if (request()->json) { return response()->json($error, 403); } else { abort(404); } } return $next($request); } }