-1

私のlaravel 4.1アプリを交換サーバーと統合する方法を探しています。

このスクリプトhttps://github.com/jamesiarmes/php-ewsを見つけました。これは、必要なものに合っているようです。ただし、それをlaravelアプリに統合する方法は今はわかりません。

アプリ フォルダー内のフォルダーにスクリプトをコピーしました

コントローラーフォルダーにコントローラーを作成しました:

<?php

require_once('/exchange-ews/ExchangeWebServices.php');
require_once('/exchange-ews/EWSAutodiscover.php');

require_once('/exchange-ews/EWSType/CalendarItemType.php');

/**
* Class to control EWS Exchnage
*/
class EwsController
{
public $server = 'xxxx';
public $username = 'xxx';
public $password = 'xxxx';
public $version = 'xxxx';

public function getCalendarEvent()
{
    $ews = new ExchangeWebServices($server, $username, $password, $version);
}

public function getServer()
{
    $ews = EWSAutodiscover::getEWS($this->$username, $this->password);

    return $ews;
}
}

私のルートでは、次のルートを作成しました:

Route::get('testEWS', function ()
{


$result = EwsController::getServer();

return $result;
});

これまでのところ、これは何もしません。ルートを呼び出すと、サーバーエラーが表示されますが、エラーの内容を確認できません。ただの白い画面。

アプリに laravel 以外のパッケージを組み込むにはまだ十分な知識がありません。どうすればいいですか?

ありがとう

アップデート

エラー発生時の xdebug エラー ログからの出力を次に示します。

fl=php:internal
fn=php::ErrorException->__construct
133 7
fl=C:\wamp\www\golfmanager\golfmanager\vendor\laravel\framework\src\Illuminate\Exception\Handler.php
fn=Illuminate\Exception\Handler->handleError
129 12886
cfl=php:internal
cfn=php::error_reporting
calls=1 0 0
131 1
cfl=php:internal
cfn=php::ErrorException->__construct
calls=1 0 0
133 7
4

1 に答える 1