PHPackages                             quiver/quiver - 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. quiver/quiver

ActiveLibrary[Framework](/categories/framework)

quiver/quiver
=============

The Quiver PHP framework. A lite extension of a thin HTTP library that gives you the freedom to write and organize PHP applications however you like.

v0.3.0(2y ago)193MITPHPPHP &gt;=8.1

Since Mar 5Pushed 2y ago1 watchersCompare

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

READMEChangelogDependenciesVersions (6)Used By (0)

Quiver
======

[](#quiver)

A lite extension of a thin HTTP library that gives you the freedom to write and organize PHP applications however you like.

Getting started
---------------

[](#getting-started)

### Installation

[](#installation)

Install Quiver with [Composer](https://getcomposer.org/). Quiver requires **PHP 8.1** or higher.

```
$ composer require quiver/quiver

```

### Web server configuration

[](#web-server-configuration)

Make sure the web server you use (Nginx, Apache, etc...) is configured to route all relevant requests to your project's front controller, which will initialize Quiver and process those requests.

Here's a basic server block example to get you started using Nginx.

```
server {
	listen 80 default_server;
	listen [::]:80 default_server;

	root /var/www/html;
	index index.htm index.php;

	server_name example.com;

	location / {
		try_files $uri $uri/ /index.php;
	}

	location ~ \.php$ {
		include snippets/fastcgi-php.conf;
		fastcgi_pass unix:/run/php/php8.1-fpm.sock;
	}
}
```

### Set up the autoloader

[](#set-up-the-autoloader)

In this example our project-specific code will be placed in an "app" folder. Given that, your `composer.json` file should look something like this.

```
{
    "require": {
        "quiver/quiver": "^0.3.0"
    },
    "autoload": {
        "psr-4": {
            "app\\": "app/"
        }
    }
}
```

Then update the autoloader with the following command.

```
$ composer dump-autoload

```

### Create the front controller to initialize Quiver

[](#create-the-front-controller-to-initialize-quiver)

Create an `index.php` file in the root directory of your project. This will be the front controller that will initialize Quiver.

In it, we will add a route `/hello/` that will execute the `hello_world` function in a controller class that we will create in the next step.

```
