marshmallow/accounting-exactonline

将Laravel连接到Exact Online。


README

Issues Forks Stars License

Marshmallow Exact Online

将Exact Online连接到您的Laravel Nova安装,以便我们可以相互连接所有内容。

安装

composer require marshmallow/package-exactonline

重要:如果您更改了配置,请确保重新启动Worker!

运行php artisan exactonline:install,然后php artisan vendor:publish --provider="Marshmallow\ExactOnline\ToolServiceProvider" --tag="config" --force

然后运行php artisan migrate以创建ExactOnline帮助表

然后我们将转到app/Providers/NovaServiceProvider以注册ExactOnline工具

class NovaServiceProvider extends NovaApplicationServiceProvider
{
    //

    protected function cards()
    {
        return [
            new \Marshmallow\ExactOnline\ExactOnlineCard,
            new Help,
        ];
    }

    //

    public function tools()
    {
        return [
            new \Marshmallow\ExactOnline\ExactOnline
        ];
    }
    
    //
}

最后,我们还需要在.env中创建一些环境变量。

EXACT_ONLINE_REDIRECT_URI=https://{{jouw_domein}}/nova/exact-online
EXACT_ONLINE_CLIENT_ID="__________"
EXACT_ONLINE_CLIENT_SECRET="______"

注意,数据注入使用队列进行,以确保网站性能。因此,请确保您的应用程序可以处理队列。例如:

php artisan queue:table
php artisan migrate
env betand: QUEUE_CONNECTION=database

php artisan config:clear
php artisan queue:work

Exact API

使用https://github.com/picqer/exact-php-client。以下静态函数用于获取连接对象,以便使用此API。

$connection = ExactOnlineConnect::connect();
$item = new \Picqer\Financials\Exact\Item($connection);
$item->find(ID);

特性

使用所有与Exact Online连接的模型,使用Exactable特性以便我们可以保存数据。

版权(c)2020 marshmallow