PHPackages                             tzfrs/urlpruner - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. tzfrs/urlpruner

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

tzfrs/urlpruner
===============

This library takes in an URL and prunes it from (probably) unnecessary data

1.2(10y ago)17142MITPHP

Since Jan 8Pushed 10y ago1 watchersCompare

[ Source](https://github.com/tzfrs/URLPruner)[ Packagist](https://packagist.org/packages/tzfrs/urlpruner)[ RSS](/packages/tzfrs-urlpruner/feed)WikiDiscussions master Synced 3w ago

READMEChangelog (3)Dependencies (1)Versions (4)Used By (0)

URL Pruner
==========

[](#url-pruner)

An easy-to-use library to prune URLs

Install
-------

[](#install)

Install via [composer](https://getcomposer.org):

```
composer require tzfrs\urlpruner
```

Run `composer install` or `composer update`.

Methods
-------

[](#methods)

`anythingAfter` - Removes everything from the URL after a character/word

`regex` - Removes parts of the URL based on the Regex

`parameters` - Removes parameters with specific keys

`allParameters` - Removes all parameters

`parameterValues` - Removes all parameters with keys that have a specific value

`prune` - Actually performs the pruning

Getting Started
---------------

[](#getting-started)

### Basic pruning

[](#basic-pruning)

```
