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 1mo ago

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 27% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity6

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity49

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

1229d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/ef976a6214e5a822744152df8992cc1c503032c4b019947d5e5bcad056d5afd1?d=identicon)[hasankaya](/maintainers/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/telescope

An elegant debug assistant for the Laravel framework.

5.2k67.8M192](/packages/laravel-telescope)[spiral/roadrunner

RoadRunner: High-performance PHP application server and process manager written in Go and powered with plugins

8.4k12.2M84](/packages/spiral-roadrunner)[nolimits4web/swiper

Most modern mobile touch slider and framework with hardware accelerated transitions

41.8k177.2k1](/packages/nolimits4web-swiper)[laravel/dusk

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

1.9k36.7M259](/packages/laravel-dusk)[laravel/prompts

Add beautiful and user-friendly forms to your command-line applications.

708181.8M596](/packages/laravel-prompts)[cakephp/chronos

A simple API extension for DateTime.

1.4k47.7M121](/packages/cakephp-chronos)

PHPackages © 2026

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