Twill 2.5.1
Fixed
Twill uses it's own internal exception handler for controllers extending
A17\Twill\Http\Admin\Controller
andA17\Twill\Http\Front\Controller
, to support unauthenticated requests redirection, custom error views and custom validation error responses.To be able to render custom exceptions or report them to an external service on a route that is mapped to Twill's controller, it is necessary to disable
twill.bind_exception_handler
. Your Laravel handler can then extend Twill's internal handler.The reasoning behind assigning a custom handler to the FrontController is to be able to redirect unauthenticated requests to
/admin-preview
routes that are registered by theshowWithPreview
route macro. This is the url showing in the CMS permalink when a record is still a draft. Not many Twill users are leveraging this frontend tooling, but it exists, so wanted to provide the rationale behind all this.This change is resolving an issue for users that were previously extending the handler for the reasons explained above, as well as making sure custom Twill errors views are automatically in use on the admin routes.