A common use case for a tabs component is to check if a routes as strings is the current route or if it exists in your app.
Laravel Route facade allows to expose the route object easily to check this:
Using the route name
$route = route('users.index');
Route::getRoutes()->match($route);
Using a string
$url = 'https://your-app.com/users';
Request::create($url)
Hope that the tip is useful!
Top comments (0)