PHPackages                             sitroz/laravel-legacy-bridge - 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. sitroz/laravel-legacy-bridge

ActiveLibrary[Framework](/categories/framework)

sitroz/laravel-legacy-bridge
============================

This package allows you to use all the familiar and powerful functionality of laravel as a library for an existing project

1.0.0(1y ago)01MITPHPPHP ~5.6

Since Dec 23Pushed 1y ago1 watchersCompare

[ Source](https://github.com/sitroz-oz/laravel-legacy-bridge)[ Packagist](https://packagist.org/packages/sitroz/laravel-legacy-bridge)[ Docs](https://github.com/sitroz-oz/laravel-legacy-bridge)[ RSS](/packages/sitroz-laravel-legacy-bridge/feed)WikiDiscussions main Synced 1mo ago

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

laravel-legacy-bridge ( LaraBridge )
====================================

[](#laravel-legacy-bridge--larabridge-)

This package allows you to use all the familiar and powerful functionality of laravel as a library for an existing project.

Possibilities
-------------

[](#possibilities)

- **Laravel Integration**: Use the power of Laravel in any PHP project.
- **HTTP Request handling**: With `LaraBridge` you can handle HTTP requests the way Laravel does it, just include the initialization file.
- **Including your dependency files**: The package primarily aims to ensure that your function files are always loaded and accessible from anywhere: anywhere in Laravel and, of course, in your project code.
- **Does not interfere with standard Laravel behavior**: use `public/index.php` and `artisan` as usual
- **Simple disable error handling**: Laravel error handler is very strong. If you are not sure that your project does not contain any warnings or errors, you can manage it.
- **Automatic installation**: The package includes scripts for automatic registration `LaraBridgeServiceProvider` and Laravel loading modifications.
- **Automatic removal**: You can run a script that will completely remove the package and will return all modified files to their original state.
- **Verifying and Rolling Back Changes**: Installation and uninstallation scripts check whether the goes through each stage of installation and rolls back changes so that your project does not stop working.

Requirements
------------

[](#requirements)

- **Laravel**: 5.4
- **PHP**: 5.6

Usage
-----

[](#usage)

Suppose your project is located in the `/path1/path2/my-project` directory. Follow these steps:

1. [Install Laravel](https://laravel.com/docs/) next to your project, for example in the `/path1/path2/laravel` directory. The name of the folder containing Laravel does not matter.
2. Install and configure the `laravel-legacy-bridge` package using Composer in `/path1/path2/laravel`.
3. Create a file `/path1/path2/my-project/bridgeExample.php` with the following content:

    ```
