DEV Community

Discussion on: Simple user roles in Laravel

Collapse
 
piercemcgeough profile image
Pierce McGeough

Do we need the ->name() or can we leave it out?

Collapse
 
martin_betz profile image
Martin Betz

You could leave that out, but I advise to always name routes. In your tests, you can write $this->get(route('name') and this will still work even if you change the URL from e.g. /old to /new.