-
Notifications
You must be signed in to change notification settings - Fork 572
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix Twill custom error view and ability to extend handler
Twill uses it's own internal exception handler for controllers extending `A17\Twill\Http\Admin\Controller` and `A17\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 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 the `showWithPreview` 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 commit is resolving issue for users that were previously extending the handler for the reasons explained above, as well as making sure custom Twill errors view are automatically in use on the admin routes.
- Loading branch information
Showing
3 changed files
with
27 additions
and
63 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.