ges/filament-green-api

Filament admin pages for configuring and using the Laravel Green API package.

Maintainers

Package info

github.com/TechGES/filament-green-api

pkg:composer/ges/filament-green-api

Statistics

Installs: 74

Dependents: 0

Suggesters: 0

Stars: 0

Open Issues: 0

0.1.5 2026-03-17 10:45 UTC

This package is auto-updated.

Last update: 2026-03-17 10:46:28 UTC


README

Filament v3 panel plugin for configuring and using ges/laravel-green-api from the Filament admin.

Installation

composer require ges/filament-green-api

Publish the plugin config:

php artisan vendor:publish --tag="filament-green-api-config"

If you have not already installed the base Green API package, run its installer:

php artisan green-api:install

Publish Filament assets so the plugin stylesheet is available in your panel:

php artisan filament:assets

If you prefer publishing manually, use the dependency package tags:

php artisan vendor:publish --tag="laravel-green-api-config"
php artisan vendor:publish --tag="laravel-green-api-migrations"
php artisan migrate

Register The Plugin

Register the plugin in your Filament panel provider:

<?php

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(),
            ]);
    }
}

Required Green API Configuration

This plugin depends on ges/laravel-green-api for transport, webhook handling, models, and contact resolution.

At minimum, make sure these values are configured in config/green_api.php or your environment:

  • api_url
  • media_url
  • instance_id
  • token
  • contact_model
  • contact_phone_attribute

If your contact model does not use a phone column, update contact_phone_attribute before opening the inbox page.

Plugin Configuration

The plugin publishes config/green_api_filament.php with:

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,
        ],
    ],
];

Set pages.settings.view_ability to restrict the configuration page and pages.whatsapp.view_ability to restrict the WhatsApp inbox page. Use pages.settings and pages.whatsapp to configure each page's access, navigation icon, group, and sort order independently.