Looking to hire Laravel developers? Try LaraJobs

weclapp-api-laravel maintained by webhubworks

Description
A Laravel wrapper around webhubworks/weclapp-api-core.
Author
Last update
2026/05/15 09:18 (dev-main)
License
Downloads
186

Comments
comments powered by Disqus

Weclapp API for Laravel

Configuration

Make sure to have set the following environment variables in your .env file:

WECLAPP_API_BASE_URL=
WECLAPP_AUTH_TOKEN=

Usage

Example usage:

<?php

namespace App\Console\Commands;

use Illuminate\Console\Command;
use Webhub\WeclappApiLaravel\Facades\Weclapp;

class WeclappTest extends Command
{
    protected $signature = 'weclapp:test';

    protected $description = 'Tests the connection to weclapp';

    public function handle()
    {
        $weclappClient = Weclapp::create();

        $result = $weclappClient->getArticleCount();

        dd($result);
    }
}

Logging

By default, logging the requests and responses is enabled. You may set the WECLAPP_ENABLE_LOGGING environment variable to false to disable logging. Logs will be written to a daily file in the storage/logs directory. The log file will be named weclapp-api-YYYY-MM-DD.log.