PHPackages                             caffeinated/path - 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. caffeinated/path

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

caffeinated/path
================

Easily customize your Laravel paths.

v1.0(10y ago)41401MITPHPPHP &gt;=5.5.9

Since Dec 23Pushed 6y agoCompare

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

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

This package has been abandoned and is no longer maintained.
============================================================

[](#this-package-has-been-abandoned-and-is-no-longer-maintained)

Caffeinated Path
================

[](#caffeinated-path)

[![Laravel 5.2](https://camo.githubusercontent.com/3c5fafdd636fa4b58339ff9c390671fac70d00e2654590261153d96a4de251db/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4c61726176656c2d352e322d6f72616e67652e7376673f7374796c653d666c61742d737175617265)](http://laravel.com)[![Source](https://camo.githubusercontent.com/ea556ed547df6fac11f9a3633c2d6966dc608970aa789a1248b07617bf4d5798/687474703a2f2f696d672e736869656c64732e696f2f62616467652f736f757263652d6361666665696e617465642f706174682d626c75652e7376673f7374796c653d666c61742d737175617265)](https://github.com/caffeinated/path)[![License](https://camo.githubusercontent.com/30597ff9a350144f03bffdd9183e16468e0b3ca1193e1d08591d992622738d55/687474703a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d627269676874677265656e2e7376673f7374796c653d666c61742d737175617265)](https://tldrlegal.com/license/mit-license)

**Note:** This was originally part of the Caffeinated/Path package. I've extracted it out into it's own package.

Caffeinated Path allows the means to easily customize the default structure of your Laravel 5 application. This means you can take the default Laravel framework structure:

```
laravel5/
|-- app/
|-- bootstrap/
|-- config/
|-- database/
|-- public/
|-- resources/
|-- storage/
|-- tests/

```

And configure it into something like:

```
laravel5/
|-- app/
|-- bootstrap/
|-- system/
	|-- config/
	|-- database/
	|-- resources/
	|-- storage/
	|-- tests/

```

The package follows the FIG standards PSR-1, PSR-2, and PSR-4 to ensure a high level of interoperability between shared PHP code.

Quick Installation
------------------

[](#quick-installation)

Begin by installing the package through Composer.

```
composer require caffeinated/path=~1.0

```

Once this operation is complete, simply add the service provider class to your project's `config/app.php` file:

#### Service Provider

[](#service-provider)

```
Caffeinated\Path\PathServiceProvider::class,
```

---

Instantiate Caffeinated Path Application
----------------------------------------

[](#instantiate-caffeinated-path-application)

First off, you'll need to use the Caffeinated Path Application instance in place of Laravel's Illuminate Foundation Application. Simply replace it within the `bootstrap/app.php` file like so:

```
$app = new Caffeinated\Path\Application(
	realpath(__DIR__.'/../')
);
```

The Caffeinated Path Application extends the Illuminate Foundation Application and adds the ability to customize the directories via the provided `path` config file.

Now you may configure any of the base paths as you like! Though do note, that some paths require a little more setup than others:

- [Setting a Custom Config Path](#setting-a-custom-config-path)
- [Changing The Bootstrap Path](#changing-the-bootstrap-path)

Read on to find out how to configure these paths, or use the above links to jump directly to any section.

---

Setting a Custom Config Path
----------------------------

[](#setting-a-custom-config-path)

If you'd like to move your `config` directory, provide the path as the second parameter when creating a new instance of the Caffeinated Path Application:

```
$app = new Caffeinated\Path\Application(
	realpath(__DIR__.'/../'),
	realpath(__DIR__.'/../system/config/')   // Your custom config path
);
```

Changing The Bootstrap Path
---------------------------

[](#changing-the-bootstrap-path)

Caffeinated Path does not provide the means to change your `bootstrap` directory path, *because* it's a simply edit you need to make within the three following files (don't worry, it's nothing complicated):

- `public/index.php`
- `bootstrap/app.php`
- `bootstrap/autoload.php`

### Step 1: Updating `public/index.php`

[](#step-1-updating-publicindexphp)

First off, you'll be wanting to change the following two `require` paths within your `public/index.php` file:

```
/*
|--------------------------------------------------------------------------
| Register The Auto Loader
|--------------------------------------------------------------------------
|
| Composer provides a convenient, automatically generated class loader for
| our application. We just need to utilize it! We'll simply require it
| into the script here so that we don't have to worry about manual
| loading any of our classes later on. It feels nice to relax.
|
*/

require __DIR__.'/../bootstrap/autoload.php';

/*
|--------------------------------------------------------------------------
| Turn On The Lights
|--------------------------------------------------------------------------
|
| We need to illuminate PHP development, so let us turn on the lights.
| This bootstraps the framework and gets it ready for use, then it
| will load up this application so that we can run it and send
| the responses back to the browser and delight our users.
|
*/

$app = require_once __DIR__.'/../bootstrap/app.php';
```

### Step 2: Updating `bootstrap/app.php`

[](#step-2-updating-bootstrapappphp)

Secondly, open your `bootstrap/app.php` file and update the relevant path to your application base:

```
$app = new Caffeinated\Path\Application(
	realpath(__DIR__.'/../')                   // Update this path
);
```

### Step 3: Updating `bootstrap/autoload.php`

[](#step-3-updating-bootstrapautoloadphp)

Lastly, open your `bootstrap/autoload.php` file and update both the *Composer autoload* and *compiled class* paths:

```
/*
|--------------------------------------------------------------------------
| Register The Composer Auto Loader
|--------------------------------------------------------------------------
|
| Composer provides a convenient, automatically generated class loader
| for our application. We just need to utilize it! We'll require it
| into the script here so that we do not have to worry about the
| loading of any our classes "manually". Feels great to relax.
|
*/

require __DIR__.'/../vendor/autoload.php';

/*
|--------------------------------------------------------------------------
| Include The Compiled Class File
|--------------------------------------------------------------------------
|
| To dramatically increase your application's performance, you may use a
| compiled class file which contains all of the classes commonly used
| by a request. The Artisan "optimize" is used to create this file.
|
*/

$compiledPath = __DIR__.'/../storage/framework/compiled.php';
```

That should be it! Simply fire up your app to verify.

###  Health Score

28

—

LowBetter than 52% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity15

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity58

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

3843d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/55915858d65ae931237d7e8ae69125f0245d3490fbe74fdd0743749ab5396244?d=identicon)[thekanbo](/maintainers/thekanbo)

---

Top Contributors

[![kaidesu](https://avatars.githubusercontent.com/u/355659?v=4)](https://github.com/kaidesu "kaidesu (5 commits)")

---

Tags

laravelpathstructurecaffeinated

### Embed Badge

![Health badge](/badges/caffeinated-path/health.svg)

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

###  Alternatives

[psalm/plugin-laravel

Psalm plugin for Laravel

3355.3M345](/packages/psalm-plugin-laravel)[renatomarinho/laravel-page-speed

Laravel Page Speed

2.5k1.7M11](/packages/renatomarinho-laravel-page-speed)[vinkius-labs/laravel-page-speed

Laravel Page Speed

2.5k12.5k1](/packages/vinkius-labs-laravel-page-speed)[emargareten/inertia-modal

Inertia Modal is a Laravel package that lets you implement backend-driven modal dialogs for Inertia apps.

90142.9k](/packages/emargareten-inertia-modal)[erag/laravel-pwa

A simple and easy-to-use PWA (Progressive Web App) package for Laravel applications.

180124.1k](/packages/erag-laravel-pwa)[wearepixel/laravel-cart

A cart implementation for Laravel

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

PHPackages © 2026

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