Skip to content

Consider if the route() helper should throw if the route does not exist #1731

@emmadesilva

Description

@emmadesilva

Right now, the route() helper returns null if the route does not exist. This means it can a typo in a Blade file like {{ route('hoem') }} will silently link to the same page (href=""). The DX could then be improved by throwing a helpful exception like in Laravel.

There have been some discussion on this before, IIRC, and we may want this in v2 paired with a deprecation warning for legacy uses.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions