<commit_before><?php namespace Rdehnhardt\MaintenanceMode\Http\Middleware;

use Closure;
use Illuminate\Support\Facades\Storage;

class MaintenanceModeMiddleware
{

    private $storage;

    public function __construct(Storage $storage)
    {
        $this->storage = $storage;
    }

    public function handle($request, Closure $next)
    {
        if (file_exists(storage_path('framework/down'))) {
            return response(view('errors.503'), 503);
        }

        return $next($request);
    }

}<commit_msg>Set view 503 exists<commit_after><?php namespace Rdehnhardt\MaintenanceMode\Http\Middleware;

use Closure;
use Illuminate\Support\Facades\Storage;

class MaintenanceModeMiddleware
{

    private $storage;

    public function __construct(Storage $storage)
    {
        $this->storage = $storage;
    }

    public function handle($request, Closure $next)
    {
        if (file_exists(storage_path('framework/down'))) {
            if (view()->exists('errors.503')) {
                return response(view('errors.503'), 503);
            } else {
                return app()->abort(503);
            }
        }

        return $next($request);
    }

}
{'fraction_non_alphanumeric': 0.1225531914893617, 'fraction_numerical': 0.017872340425531916, 'mean_word_length': 2.652173913043478, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5929796', 'n_tokens_mistral': 359, 'n_tokens_neox': 333, 'n_words': 66}