PHPackages                             texnder/routex - 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. texnder/routex

ActiveLibrary

texnder/routex
==============

light and fast routing system for PHP framework

v1.0.6(5y ago)017MITPHP

Since Mar 28Pushed 5y ago1 watchersCompare

[ Source](https://github.com/texnder/routex)[ Packagist](https://packagist.org/packages/texnder/routex)[ RSS](/packages/texnder-routex/feed)WikiDiscussions master Synced 5d ago

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

routex
======

[](#routex)

light and fast routing system for PHP framework

Installation
------------

[](#installation)

install this library using composer.

```
syntax:
	composer require texnder/routex

```

Routex Response
---------------

[](#routex-response)

To get client response data create \[Routex\\http\\Response class\] new instance and call its getResponse method. Routex\\http\\Response has a \[Routex\\http\\Request class\] dependency. so inject it by creating this instance or simply create \[Routex\\http\\Response class\] using aditex dependency injector. Routex is dependent on aditex, it means it will install automatically, when you install Routex using composer.

Clean Url
---------

[](#clean-url)

using routex library you can write clean urls for application pages. It's easy and fast in use. It provides professional look to your website and also helps you indexing high in google search. clean url very much helps in digital marketing and search engine optimisation(SEO).

defined your own routes
-----------------------

[](#defined-your-own-routes)

Routex provides full freedom to define custom Urls for each pages of application. if client request is different from Urls which are defined in application, client will get \[404 http error\] response.

```
syntax:
	use Routex\Route;

	// for get requests

	Route::get('my-custom-url/{key}/$_GET-key-in-curly-braces/{id}', 'controller@method');

	or

	Route::get('my-custom-url/{key}/$_GET-key-in-curly-braces/{id}', function(){
			return view('ViewName(without extension and use [.] for directory separation)');
	});

	or

	Route::get('my-custom-url/{key}/$_GET-key-in-curly-braces/{id}', function(){
			// valid codes..
			return "hello world";
	});

	// for post request

	Route::post('my-custom-url', 'controller@method');

	or

	Route::post('my-custom-url', function(){
			return view('ViewName(without extension and use [.] for directory separation)');
	});

	or

	Route::post('my-custom-url', function(){
			// valid codes..
			return "hello world";
	});

```

create Route instance
---------------------

[](#create-route-instance)

create new instance and pass resource directory path and view file extension(\[.html\] or \[.php\] : By default it's \[.php\]) as argument for constructor.

```
syntax:
	Routex\Route(string [resource directory],string [file .extension]);

```

Use .htaccess file
------------------

[](#use-htaccess-file)

use .htaccess file to redirecting each request to Routex library, where it can resolve requested url and send response data to client back.

for Example: let we want to create application where \[index.php\] file is under public folder and we want all request should go to \[index.php\] file. in that case we can create .htaccess file in root and public folder with codes below.

```
syntax:
	# .htaccess file in root directory in which public folder exist
	# to block indexing of directory
	Options All -Indexes

	# to block access for config or security files

    ## Apache 2.2
  	Order allow,deny
   	Deny from all
   	Satisfy All

	# to redirect all request in public folder
	RewriteEngine On
	RewriteCond %{REQUEST_URI} !^/public/
	RewriteRule (.*) public/$1 [L]

	# .htaccess file in public directory where index.php file exist
	# to redirect all request to index file
	# here you can redirect to any other files if you want

    RewriteEngine On
    # Removes index.php from ExpressionEngine URLs
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule ^(.*)$ index.php/$1 [L,QSA]

```

For more information please visit [.htaccess](https://httpd.apache.org/docs/2.4/howto/htaccess.html)

any queries
-----------

[](#any-queries)

for any further queries, please email us on: ()

Documentation
-------------

[](#documentation)

documentation for all texnder APIs available [here](http://texnder.com/documentation/)

License
-------

[](#license)

The aditex is open-sourced php library licensed under the [MIT license](http://opensource.org/licenses/MIT).

###  Health Score

26

—

LowBetter than 43% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity6

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity58

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 93.3% 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 ~52 days

Total

3

Last Release

2134d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/b7618ce654c84c7e049e5bd1c705f55441022982e26088cc74ea747bcde9af4e?d=identicon)[texnder](/maintainers/texnder)

---

Top Contributors

[![Inder918](https://avatars.githubusercontent.com/u/47007271?v=4)](https://github.com/Inder918 "Inder918 (14 commits)")[![texnder](https://avatars.githubusercontent.com/u/61691477?v=4)](https://github.com/texnder "texnder (1 commits)")

---

Tags

http-routerphp-routerroutexMVC Router for PHP framework

### Embed Badge

![Health badge](/badges/texnder-routex/health.svg)

```
[![Health](https://phpackages.com/badges/texnder-routex/health.svg)](https://phpackages.com/packages/texnder-routex)
```

###  Alternatives

[miladrahimi/phprouter

A powerful, lightweight, and very fast HTTP URL router for PHP projects.

20832.6k2](/packages/miladrahimi-phprouter)[inhere/sroute

a very lightweight and fasted request router. lightweight web framework

732.8k](/packages/inhere-sroute)

PHPackages © 2026

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