I’m working on a website which is built using native php but to speed up the development i have installed laravel in sub directory called new , where im using all the laravel features and serving the new pages as mywebsite.com/new/any-laravel-route.
I want to use the laravel Models/Repositories outside of laravel container with native php by requiring the minimum amount of files to bootstrap the laravel.
I’m using following code to initialize laravel
require 'v2/bootstrap/autoload.php'; $ app = require_once 'v2/bootstrap/app.php'; $ kernel = $ app->make('Illuminate\Contracts\Http\Kernel'); $ kernel->handle( $ request = Illuminate\Http\Request::capture() );
its working quite slow considering the already included files of native platform code as well.
What im looking for is
- Use laravel features with native php
- Laravel should not handle HTTP request (as its doing with the above code)