PHP code example of ges / filament-green-api

1. Go to this page and download the library: Download ges/filament-green-api 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/ */

    

ges / filament-green-api example snippets




namespace App\Providers\Filament;

use Filament\Panel;
use Filament\PanelProvider;
use Ges\FilamentGreenApi\GreenApiPlugin;

class AdminPanelProvider extends PanelProvider
{
    public function panel(Panel $panel): Panel
    {
        return $panel
            ->plugins([
                GreenApiPlugin::make(),
            ]);
    }
}

return [
      'pages' => [
        'settings' => [
            'view_ability' => null,
            'navigation_icon' => 'heroicon-o-cog-6-tooth',
            'navigation_group' => 'Communication',
            'navigation_sort' => 1,
        ],
        'whatsapp' => [
            'view_ability' => null,
            'navigation_icon' => 'heroicon-o-chat-bubble-left-right',
            'navigation_group' => 'Communication',
            'navigation_sort' => 2,
        ],
    ],
];
bash
php artisan vendor:publish --tag="filament-green-api-config"
bash
php artisan green-api:install
bash
php artisan filament:assets
bash
php artisan vendor:publish --tag="laravel-green-api-config"
php artisan vendor:publish --tag="laravel-green-api-migrations"
php artisan migrate