PHPackages                             kawikaconnell/fruiter - 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. kawikaconnell/fruiter

ActiveLibrary[Framework](/categories/framework)

kawikaconnell/fruiter
=====================

A simple routing library. Highly inspired by functional programming.

05PHPCI failing

Since Feb 13Pushed 6y ago1 watchersCompare

[ Source](https://github.com/kawika-connell/fruiter)[ Packagist](https://packagist.org/packages/kawikaconnell/fruiter)[ RSS](/packages/kawikaconnell-fruiter/feed)WikiDiscussions master Synced today

READMEChangelogDependenciesVersions (1)Used By (0)

Fruiter
=======

[](#fruiter)

A simple routing library. Highly inspired by functional programming. Skip to [installation](#fruiter-installation).

This project was created as a challenge for me. I've messed around with Laravel before and used their router, but I never really felt confident I understood what it was doing. I doubt writing this library will give me a complete understanding as to what Laravel is doing (considering I didn't bother to look at its source code before writing it), but I enjoyed writing a routing library from scratch, trying to solve all the problems I encountered on my own. I used this project to explore functional programming too. At first everything was higher-order functions (a function that either takes a function as an argument or returns a function), but I switched to classes in the end. I still followed some functional principles for the project. That aside, installation and usage instruction is below.

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

[](#installation)

You can install the package via composer or by downloading it and including `fruiter.php` in your program.

### Installation via Composer

[](#installation-via-composer)

Run the following command in your project root:

```
composer require kawikaconnell/fruiter

```

### Manual Installation

[](#manual-installation)

1. Click the green *clone or download* in the top right corner.
2. Pick an option (cloning via https or ssh, opening in desktop, or downloading the zip file)
3. Make sure the code is somewhere in the project root
4. Require it `require_once '/where/ever/you/put/it/fruiter.php'; `

Usage
-----

[](#usage)

Here is a basic usage example:

```
