Twill is an open source CMS toolkit for Laravel that helps developers rapidly create a custom admin console that is intuitive, powerful and flexible. Chat with us on Discord at https://discord.gg/cnWk7EFv8R.
The method getFullUrl has an unexpected side effect, because it constructs the controller of the model which binds a different exception handler even if the request doesn't originate from twill
This is problematic as then exceptions are not rendering as expected or reported to sentry
(And yes I spent 3 hours trying to figure out why my 404 pages were rendering like this in production
instead of with my custom view, long story short I have a menu that uses a Page model and gets the url of those pages using getFullUrl)
The method
getFullUrl
has an unexpected side effect, because it constructs the controller of the model which binds a different exception handler even if the request doesn't originate from twillThis is problematic as then exceptions are not rendering as expected or reported to sentry
https://github.com/area17/twill/blob/6d022399eb8ab1d76aaea3e49d76fece54d62cc1/src/Models/Model.php#L185-L197 https://github.com/area17/twill/blob/6d022399eb8ab1d76aaea3e49d76fece54d62cc1/src/Http/Controllers/Admin/Controller.php#L20-L25
(And yes I spent 3 hours trying to figure out why my 404 pages were rendering like this in production instead of with my custom view, long story short I have a menu that uses a Page model and gets the url of those pages using getFullUrl)