honda/url-resolver

This package is abandoned and no longer maintained. The author suggests using the felixdorn/laravel-url-resolver package instead.

Resolve routes and urls with one function.

1.0.0 2021-11-07 09:05 UTC

README

Url Resolver for Laravel

Resolve routes and urls with one function.

Tests Formats Version Total Downloads License

Installation

Requires PHP 8.0+

You can install the package via composer:

composer require felixdorn/laravel-url-resolver

Usage

use Honda\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

Runs the entire test suite:

composer test

Runs PHP CS Fixer:

composer lint

Runs PHPStan:

composer test:types

Runs unit tests

composer test:unit

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