Ford's Garage

Small garage of one Ford in the big internet


Invoke laravel from modx


Create snippet 'laravel' with next content


<?php
require $_SERVER['DOCUMENT_ROOT'].'/laravel/vendor/autoload.php';
$app = require_once $_SERVER['DOCUMENT_ROOT'].'/laravel/bootstrap/app.php';
$kernel = $app->make(Illuminate\Contracts\Http\Kernel::class);
$request = Illuminate\Http\Request::capture();
$response = $kernel->handle($request);
$response->sendHeaders();
$response->sendContent();

Create new page with empty template and set next content


[[!laravel]]

Now you can handle this url on laravel side