Skip to content

Controllers methods should return 404 for invalid ids #46

Open
@adwiv

Description

@adwiv

The show and edit routes may result in errors since we use find($id) which returns null if id is not found.

This results in a null model being passed to the view.

We should instead use findOrFail which results in 404 if id does not exist.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions