PHPackages                             daison/bus-router-sg - 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. daison/bus-router-sg

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

daison/bus-router-sg
====================

A route finder that helps you which bus is the best to ride to go to your destination.

V0.1.2(8y ago)011MITPHP

Since Feb 4Pushed 8y ago1 watchersCompare

[ Source](https://github.com/daison12006013/bus-route-finder-prototype)[ Packagist](https://packagist.org/packages/daison/bus-router-sg)[ RSS](/packages/daison-bus-router-sg/feed)WikiDiscussions master Synced yesterday

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

Prologue
========

[](#prologue)

This package uses a laravel's model, so it is not an agnostic itself, but later on I will convert this package to support other framework and not to bound the models.

Installation
============

[](#installation)

You need a laravel application atleast ~5.x, better to use Laravel 5.5 to have the package discovery.

To install this package to your laravel app, you need to run below

```
composer require daison/bus-router-sg

```

If your laravel app doesn't support a package discovery, then you need to add this class inside your `config/app.php@providers`

```
    'providers' => [
        // ...
        Daison\BusRouterSg\BusRouterSgServiceProvider::class
    ],

```

After installing, you need to create a database table and assign to your `.env` file

Execute `php artisan migrate` and `php artisan bus-router-sg:parse-json`

Class API Test
==============

[](#class-api-test)

To test the class matching logic, an example below will help you.

```
$instance = new Daison\BusRouterSg\Util\Match(
    $myLat = 1.37313809346006,
    $myLng = 103.89156818388481,
    $destLat = 1.38372439268243,
    $destLng = 103.76068878232401
);

$instance->handle();

```

As of now, the above will give you a lists of paths that you could use to render to your Google Map Api.

```
array:35 [
  0 => "1.37313809346006:103.89156818388481",
  1 => "1.37060695394614:103.89266808874676",
  2 => "1.36756333302324:103.8927594439902",
  3 => "1.36623834226067:103.89129134480065",
  // ...,
  32 => "1.37961719959059:103.76390959462616",
  33 => "1.38178063199093:103.76285898246775",
  34 => "1.38372439268243:103.76068878232401",
]

```

I'm currently working on the buses that you could take based on the routes returned, which you could find below **Pending Tasks**.

Tests
=====

[](#tests)

To test the package, I wrote a simple test class inside the `tests/` folder.

Run `phpunit` under this root folder.

Pending Tasks for this Prototype
================================

[](#pending-tasks-for-this-prototype)

- Matching Logic
    - Finding the nearest bus to take and the nearest bus to your destination.
    - Using Dijkstra's Algorithm to connect each bus routes (lat and long).
    - Compile the lists of buses to based on the routes (lat and long).
    - Test
- User Interface
    - User Login
    - Form that needs to put the current location or get the current user's location using the browser api.
- CRUD for buses
- CRUD for bus stations
- CRUD for locations
- Search using Postal Code
- Search using a freeform address input and determine the postal code

###  Health Score

27

—

LowBetter than 49% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity5

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity65

Established project with proven stability

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

Total

3

Last Release

3013d ago

### Community

Maintainers

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

---

Top Contributors

[![daison12006013](https://avatars.githubusercontent.com/u/4581415?v=4)](https://github.com/daison12006013 "daison12006013 (18 commits)")

### Embed Badge

![Health badge](/badges/daison-bus-router-sg/health.svg)

```
[![Health](https://phpackages.com/badges/daison-bus-router-sg/health.svg)](https://phpackages.com/packages/daison-bus-router-sg)
```

###  Alternatives

[mpociot/reflection-docblock

8515.6M51](/packages/mpociot-reflection-docblock)

PHPackages © 2026

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