PHPackages                             luckystar/php-router - 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. [Framework](/categories/framework)
4. /
5. luckystar/php-router

ActiveLibrary[Framework](/categories/framework)

luckystar/php-router
====================

A simple and fast PHP router

v1.4(3y ago)015MITPHP

Since Jan 4Pushed 3y ago1 watchersCompare

[ Source](https://github.com/HasanKaya53/php-router)[ Packagist](https://packagist.org/packages/luckystar/php-router)[ RSS](/packages/luckystar-php-router/feed)WikiDiscussions main Synced today

READMEChangelog (5)DependenciesVersions (6)Used By (0)

PHP Router
==========

[](#php-router)

simple and fast php page router.

\#How Install

```
 composer require luckystar/php-router
```

Plase add .htacces file:

Features
--------

[](#features)

- GET/POST Methods
- Simple To Use
- Easily import php or html files
- You cant use parameters. :(

upcoming features

- Add Parameters.
- Add Middleware

Usage/Examples
--------------

[](#usageexamples)

```
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^ index.php [L]
```

Set Theme folder

```
LuckyStar\PhpRouter\BHRouter::$themeFolder = "src/themes/";
```

Calling php when the index request comes

```
LuckyStar\PhpRouter\BHRouter::get("/", 'index.php');
```

Calling php when the about request comes

```
LuckyStar\PhpRouter\BHRouter::get("/about", 'about-page.php');
```

Calling function when the index request comes

```
 LuckyStar\PhpRouter\BHRouter::post("/", function(){
    echo "test";
});
```

pass variables

```
$pages = ['index','header','footer'];
LuckyStar\PhpRouter\BHRouter::get("/", 'index.php', $pages);
```

Get URL Parameters

```
LuckyStar\PhpRouter\BHRouter::get('/bloglar/tes/{name}/{surname}', 'bloglar.php');
```

OR

```
LuckyStar\PhpRouter\BHRouter::get('/bloglar/tes/{name}/{surname}', function(){
    echo $_GET['name'];
    echo $_GET['surname'];
});
```

404 pages usage: (should be added to the end of the page. )

```
LuckyStar\PhpRouter\BHRouter::noOne("/404", function(){
    echo "there is no such page";
});
```

###  Health Score

23

—

LowBetter than 26% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity6

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity50

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 ~0 days

Total

5

Last Release

1274d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/8221001?v=4)[Hasan Kaya](/maintainers/hasankaya)[@hasankaya](https://github.com/hasankaya)

---

Top Contributors

[![HasanKaya53](https://avatars.githubusercontent.com/u/35229371?v=4)](https://github.com/HasanKaya53 "HasanKaya53 (7 commits)")

---

Tags

phpphp-routerrouter

### Embed Badge

![Health badge](/badges/luckystar-php-router/health.svg)

```
[![Health](https://phpackages.com/badges/luckystar-php-router/health.svg)](https://phpackages.com/packages/luckystar-php-router)
```

###  Alternatives

[laravel/dusk

Laravel Dusk provides simple end-to-end testing and browser automation.

1.9k39.6M300](/packages/laravel-dusk)[nineinchnick/edatatables

Grid widget for the Yii Framework, wrapper for the DataTables jQuery plugin

173.2k](/packages/nineinchnick-edatatables)[link-cloud/fast-hyperf

LinkCloud Fast Hyperf

241.2k1](/packages/link-cloud-fast-hyperf)

PHPackages © 2026

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