PHPackages                             alcaitiff/laravel-urlencode - 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. alcaitiff/laravel-urlencode

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

alcaitiff/laravel-urlencode
===========================

Allow Urlencoded slashed and more in routing parameters

1.0.2(6y ago)3994↓100%2GPL-3.0+PHPPHP &gt;=5.3.0

Since Dec 27Pushed 6y ago1 watchersCompare

[ Source](https://github.com/alcaitiff/laravel-urlencode)[ Packagist](https://packagist.org/packages/alcaitiff/laravel-urlencode)[ RSS](/packages/alcaitiff-laravel-urlencode/feed)WikiDiscussions master Synced 1mo ago

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

Laravel 5 Url Encode
====================

[](#laravel-5-url-encode)

Overrides the default routing in Laravel 5 to allow all characters to be encoded including slashes!

This project is an adaptation of  allowing this fix to work in Laravel 5

Composer configuration
----------------------

[](#composer-configuration)

Include the artistan urlencode package as a dependency in your `composer.json` [Packagist](https://packagist.org/packages/alcaitiff/laravel-urlencode):

```
    "alcaitiff/laravel-urlencode:"1.*"
```

Or execute the command

```
    composer require alcaitiff/laravel-urlencode:"1.*"
```

### Installation

[](#installation)

Once you update your composer configuration, run `composer install` to download the dependencies.

Add a ServiceProvider to your providers array in `app/config/app.php`:

```
  'providers' => [
    ...
    Alcaitiff\LaravelUrlEncode\RouteServiceProvider::class,
    ...
  ];
```

Add a method on your App\\Http\\Kernel to allow the router substitution

```
  //This is needed because Laravel DO NOT use his own service provider system
  //You can't change the app router and the kernel router through the dependency injection
  //The framework set a router at the very beginning of the stack and do not allow changes
  //We can only hope in future implementations actually using the injection system allowing that
  public function setRouter(Router $router) {
    $this->router = $router;
    return $this;
  }
```

### Apache conf [AllowEncodedSlashes](http://httpd.apache.org/docs/2.2/mod/core.html#allowencodedslashes)

[](#apache-conf-allowencodedslashes)

```
  AllowEncodedSlashes On|NoDecode
```

### Warning

[](#warning)

Ensure all your routes are properly rawurlencoded!

This package will actually break your routing IF you do not have valid urls in your routes.

### Laravel Bug Fix

[](#laravel-bug-fix)

[\[Bug\] urlencoded slashes in routing parameters](https://github.com/laravel/framework/pull/4338)Current routes do not allow for urlencoded slashes in the paths. This is problematic when trying to create ecommerce solutions with partnumbers in the routes since many part numbers have slashes in them. There are also quite a few manufacturers with slashes in their names and or brands. This package provides the functionality to allow an uri to have encoded slashes, and other characters, in the [routes](http://laravel.com/docs/routing) and also to [create routes with those parameters](http://laravel.com/docs/routing#route-parameters).

An example url may be...

```
  //https://stage.test.com/part/Cisco%20Systems%2C%20Inc/CISCO2851-SRST%2FK9
    Route::any('/part/{mfg}/{part}',
        array(
            'uses' =>'Vendorname\Package\Controllers\Hardware\PartController@part',
            'as' => 'part_page'
        )
    );
```

### Usage

[](#usage)

With that said it WILL allow all characters to be rawurlencoded as parameters in your routes without breaking parameters and/or routes.

###  Health Score

29

—

LowBetter than 60% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity21

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity54

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~59 days

Total

3

Last Release

2207d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/0d7284054de2eb9724c87b3845b27609aa7ced713da3bdb5b371e58d7e676704?d=identicon)[alcaitiff](/maintainers/alcaitiff)

---

Top Contributors

[![alcaitiff](https://avatars.githubusercontent.com/u/14186387?v=4)](https://github.com/alcaitiff "alcaitiff (1 commits)")

---

Tags

laravellaravel5urlencodealcaitiff

### Embed Badge

![Health badge](/badges/alcaitiff-laravel-urlencode/health.svg)

```
[![Health](https://phpackages.com/badges/alcaitiff-laravel-urlencode/health.svg)](https://phpackages.com/packages/alcaitiff-laravel-urlencode)
```

###  Alternatives

[brexis/laravel-workflow

Integerate Symfony Workflow component into Laravel.

283125.6k](/packages/brexis-laravel-workflow)[misterphilip/maintenance-mode

An enhanced drop-in replacement for Laravel's maintenance mode

120176.7k](/packages/misterphilip-maintenance-mode)[leantony/laravel-grid

A grid view for laravel, inspired by the yii2 grid widget

9060.2k](/packages/leantony-laravel-grid)[casinelli/currency

Handles currency for Laravel 5.

1911.8k](/packages/casinelli-currency)[seanstewart/plan-config

Plan config allows you to easily define attributes and limits for your SaaS application subscription plans.

314.0k](/packages/seanstewart-plan-config)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
