Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

segunsmart's avatar

Check if a route or route name exist in Laravel 7

Hello good day.

Can someone please help me out, I want to check if a route exists and also if a url belongs to the site domain.

I have tried Route::has(), it has been removed in Laravel 7.

Thanks

0 likes
4 replies
segunsmart's avatar

@michaloravec Thank you, I was accessing using wrongly instead of using

\Illuminate\Support\Facades\Route::has()

I was using

Illuminate\Routing\Route::has
szajens's avatar

Why is this method not available for official documentation?

olivsinz's avatar

I've found that not everything is in the documentation. Sometimes I find more to learn in the source code itself.

Please or to participate in this conversation.