PHPackages                             larablocks/highway - 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. larablocks/highway

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

larablocks/highway
==================

0.1(9y ago)016MITPHPPHP &gt;=5.5.9

Since Aug 5Pushed 9y ago2 watchersCompare

[ Source](https://github.com/larablocks/highway)[ Packagist](https://packagist.org/packages/larablocks/highway)[ RSS](/packages/larablocks-highway/feed)WikiDiscussions master Synced 4w ago

READMEChangelogDependencies (5)Versions (2)Used By (0)

Highway (Beta)
==============

[](#highway-beta)

A Laravel 5.0+ package that facilitates easy and simple transferring of data between different data storage and format types (CSV, Databases)

Coming Soon - (XML, JSON, YAML, Eloquent Models)

> Note: All Larablocks packages will have releases in line with the major Laravel framework version release. (Ex. Highway 5.2.\* is tested to work with Laravel 5.2.\* while Highway 5.1.\* is tested to worked with Laravel 5.1.\*)

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

[](#installation)

Add `larablocks/highway` as a requirement to `composer.json`:

```
{
    "require": {
        "larablocks/highway": "~0.1"
    }
}
```

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

Laravel Integration
-------------------

[](#laravel-integration)

To wire this up in your Laravel project you need to add the service provider. Open `app.php`, and add a new item to the providers array.

```
Larablocks\Highway\HighwayServiceProvider::class,
```

Then you may add a Facade for more convenient usage. In your `app.php` config file add the following line to the `aliases` array.

```
'Highway' => Larablocks\Highway\Highway::class,
```

Note: The Highway facade will load automatically, so you don't have to add it to the `app.php` file but you may still want to keep record of the alias.

To publish the default config file `config/highway.php` use the artisan command:

`php artisan vendor:publish --provider="Larablocks\Highway\HighwayServiceProvider"`

Usage as a Facade
-----------------

[](#usage-as-a-facade)

```
Highway::
```

Format Readers
--------------

[](#format-readers)

Highway allows for you to read from one content format. First add the content format type and configuration for the format you would like Highway to read from.

```
Highway::addReader($type, $config_options[])
```

#### CSV Reader

[](#csv-reader)

```
$configs = [
    'file_path' => 'path_to_csv_file')] // required
    'delimiter' => 'delimter string')]  // optional, defaults to ','
    'enclosure' => 'enclosure string')] // optional, defaults to '"'
]

Highway::addReader('csv', $configs)
```

#### Database Reader

[](#database-reader)

```
$configs = [
    'table' => 'table_to_read_from')] // required
    'results' => 'query builder results from table'  // optional else returns all results from table  Ex. 'results' => DB::table('users')->where('first_name', 'John')->get()
]

Highway::addReader('database', $configs)
```

Format Writers
--------------

[](#format-writers)

Highway allows for you to write to multiple content formats. After you have set up your one reader you may include multiple writers. Add these content format types and their configurations.

```
Highway::addWriter($type, $config_options[])
```

#### CSV Writer

[](#csv-writer)

```
$configs = [
    'file_path' => 'path_to_csv_file')] // required
    'delimiter' => 'delimter string')]  // optional, defaults to ','
    'enclosure' => 'enclosure string')] // optional, defaults to '"'
]

Highway::addWriter('csv', $configs)
```

#### Database Writer

[](#database-writer)

```
$configs = [
    'table' => 'table_to_write_to')] // required
]

Highway::addWriter('database', $configs)
```

Run the Process
---------------

[](#run-the-process)

Once at least one reader and writer have been added you may run the process of transferring the data.

```
Highway::run()
```

Examples
--------

[](#examples)

#### Single Writer Example

[](#single-writer-example)

```
Highway::addReader('database', ['table' => 'users', 'results' => DB::table('users')->where('first_name', 'Devin')->get()]);
Highway::addWriter('csv', ['file_path' => public_path('export/users.csv')]);
Highway::run();
```

#### Multiple Writer Example

[](#multiple-writer-example)

```
Highway::addReader('database', ['table' => 'users']);
Highway::addWriter('csv', ['file_path' => public_path('export/users.csv')]);
Highway::addWriter('csv', ['file_path' => public_path('export/users-tab-delimited.csv'), 'delimiter' => "\t", 'enclosure' => "'"]);
Highway::run();
```

License
-------

[](#license)

Highway is open-sourced software licensed under the [MIT license](http://opensource.org/licenses/MIT)

###  Health Score

22

—

LowBetter than 21% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity6

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity48

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

Unknown

Total

1

Last Release

3617d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/964dc41092188416a5ade7be0bea1b81079ae8e236731ea5d2ed8d9d3868efab?d=identicon)[emitkowski](/maintainers/emitkowski)

---

Top Contributors

[![emitkowski](https://avatars.githubusercontent.com/u/4722552?v=4)](https://github.com/emitkowski "emitkowski (1 commits)")

---

Tags

laravel5.2

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/larablocks-highway/health.svg)

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

###  Alternatives

[psalm/plugin-laravel

Psalm plugin for Laravel

3345.1M337](/packages/psalm-plugin-laravel)[wearepixel/laravel-cart

A cart implementation for Laravel

1355.6k](/packages/wearepixel-laravel-cart)

PHPackages © 2026

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