pieter365/legacy-laravel

Runs legacy codebase inside a Laravel Project

dev-main 2023-02-13 10:32 UTC

This package is auto-updated.

Last update: 2024-11-13 14:15:49 UTC


README

Runs legacy code inside a Laravel project for example Codeigniter

Why?

To assist to run a legacy project inside laraval

Installation

1 - Create a new laravel project

composer create-project --prefer-dist laravel/laravel {projectName} "9.0.*"

2 - Require via Composer

composer create-project legacy-laravel

3 - Get configuration file

php artisan vendor:publish

4 - Put your legacy project inside ./legacy folder.

Details

Add the following to your routes/web.php to make sure that the routing works correct for you legacy setup

Route::middleware('legacy')
    ->any('/{path}', ['as' => 'legacy', 'uses' => '\Legacy\Controller@index'])
    ->where('path', '.*');