PHPackages                             noweh/laravel-dijkstra - 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. noweh/laravel-dijkstra

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

noweh/laravel-dijkstra
======================

Shortest path-algorithm for Laravel.

0.1.0(3y ago)3321MITPHPPHP ^7.2 || ^8.0

Since Aug 10Pushed 3y ago1 watchersCompare

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

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

Dijkstra algorithm for Laravel
==============================

[](#dijkstra-algorithm-for-laravel)

[![Laravel](https://camo.githubusercontent.com/28eb92a1e05bd5cf2cfaf7beeffc4d6bcfde12305feb3a8f00d92f13a76f4052/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4c61726176656c2d76382f76392d3832386362372e7376673f6c6f676f3d4c61726176656c26636f6c6f723d464632443230)](https://laravel.com/)[![PHP](https://camo.githubusercontent.com/ef32ea9aa610bf6b6c1ac38a5d84ebc386da0c48797968bea76f2200a2a6dce0/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f5048502d76372e332d3832386362372e7376673f7374796c653d666c61742d737175617265)](https://camo.githubusercontent.com/ef32ea9aa610bf6b6c1ac38a5d84ebc386da0c48797968bea76f2200a2a6dce0/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f5048502d76372e332d3832386362372e7376673f7374796c653d666c61742d737175617265)[![MIT Licensed](https://camo.githubusercontent.com/c32374f293638fb17aefe1b83e9e8ec1b20f443776c90cf2aafe12efd00f1fff/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6963656e73652f6e6f7765682f6c61726176656c2d64696a6b73747261)](LICENSE)

A laravel implementation of [Dijkstra algorithm](https://en.wikipedia.org/wiki/Dijkstra%27s_algorithm).

Dijkstra's algorithm, conceived by computer scientist Edsger Dijkstra, is a graph search algorithm that solves in single-source shortest path problem for a graph with non-negative edge path costs, producing a shortest path tree.

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

[](#installation)

First you need to add the component to your composer.json

```
composer require noweh/laravel-dijkstra

```

Update your packages with *composer update* or install with *composer install*.

Laravel uses Package Auto-Discovery, so doesn't require you to manually add the ServiceProvider.

### Laravel without auto-discovery

[](#laravel-without-auto-discovery)

After updating composer, add the ServiceProvider to the providers array in config/app.php

```
Noweh\Dijkstra\DijkstraServiceProvider::class,

```

### Migration

[](#migration)

The migrations of this package are publishable under the "migrations" tag via:

```
php artisan vendor:publish --provider="Noweh\Dijkstra\DijkstraServiceProvider" --tag="migrations"

```

Usage
-----

[](#usage)

### Operations with Points and draw graph / find shortest path

[](#operations-with-points-and-draw-graph--find-shortest-path)

```
