$exception->getMessage()], 404); }); API::error(function (\CachetHQ\Cachet\Repositories\InvalidModelValidationException $exception) { return Response::make(['status_code' => 400, 'message' => 'Bad Request'], 400); }); App::missing(function ($exception) { if (Request::is('dashboard*') or Request::is('api*')) { return Response::view('errors.404', [ 'pageTitle' => trans('cachet.dashboard.not_found_title'), ], 404); } return Redirect::route('status-page'); }); /* |-------------------------------------------------------------------------- | Maintenance Mode Handler |-------------------------------------------------------------------------- | | The "down" Artisan command gives you the ability to put an application | into maintenance mode. Here, you will define what is displayed back | to the user if maintenance mode is in effect for the application. | */ App::down(function () { return Response::make("Be right back!", 503); }); /* |-------------------------------------------------------------------------- | Analytics |-------------------------------------------------------------------------- | | We handle all Segment.com tracking here. The function call will only do | something if tracking is enabled. | */ segment_identify();