PHP code example of wxm / laravel-venomancer

1. Go to this page and download the library: Download wxm/laravel-venomancer library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

wxm / laravel-venomancer example snippets


    Wxm\LaravelVenomancer\ServiceProvider::class
    

    $app->register(Wxm\LaravelVenomancer\ServiceProvider::class);
    



$router->get('highchart', function () {
    return response()->make(
        highchart([
            'chart' => [
                'type' => 'line',
            ],
            'plotOptions' => [
                'series' => [
                    'animation' => false
                ]
            ],
            'title' => [
                'text' => '标题'
            ],
            'credits' => [
                'enabled' => false
            ],
            'series' => [
                [
                    'name' => '数值',
                    'data' => [1, 2, 3, 4]
                ]
            ]
        ]), 200, ['Content-Type' => 'image/jpeg']
    );
});

// 访问 /highchart 试试
// 选项详情请查看 highchart api
shell
    php artisan vendor:publish --provider="Wxm\LaravelVenomancer\ServiceProvider" --force