I've installed AMF PHP 2.2 via composer so source resides on vendor directory and my vendor directory not inside the web root. How do i bypass or route to amf back office and service directory which placed on the web root?
Using Amfphp installed via Composer in a Laravel controller:
namespace App\Http\Controllers;
use App\Http\Controllers\Controller;
use Amfphp_Core_HttpRequestGatewayFactory;
use Amfphp_Core_Config;
class AmfphpController extends Controller {
public function amfphp() {
$myConfig = new Amfphp_Core_Config();
$myConfig->serviceFolders = array();
$myConfig->serviceFolders [] = dirname(__FILE__) . '/../Services/';
$gateway = Amfphp_Core_HttpRequestGatewayFactory::createGateway($myConfig);
$gateway->service();
$gateway->output();
}
}
Put your services in app/Http/Services directory