felixdorn/laravel-url-resolver

Resolve routes and urls with one function.

2.0.2 2022-09-18 09:06 UTC

README

Repository has been moved from laravel-honda/url-resolver to felixdorn/laravel-url-resolver.

Url Resolver for Laravel

Resolve routes and urls with one function.

Tests Formats Version Total Downloads codecov

Installation

Supports PHP 8.0 and PHP 8.1.

You can install the package via composer:

composer require felixdorn/laravel-url-resolver

Usages

use Felix\UrlResolver\UrlResolver;

UrlResolver::guess('welcome', []); 
  • The route exists: route('...', $context)
  • The route does not exist: url(...')
  • The "route" is an external URL: returns it

Testing

composer test

Url Resolver for Laravel was created by Félix Dorn under the MIT License