PHP code example of freedomtech-hosting / polydock-app-amazeeio-generic

1. Go to this page and download the library: Download freedomtech-hosting/polydock-app-amazeeio-generic 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/ */

    

freedomtech-hosting / polydock-app-amazeeio-generic example snippets


use FreedomtechHosting\PolydockAppAmazeeioGeneric\PolydockApp;

#[PolydockAppTitle('Generic Lagoon App')]
class PolydockApp extends PolydockAppBase

use FreedomtechHosting\PolydockAppAmazeeioGeneric\PolydockAiApp;

#[PolydockAppTitle('Generic Lagoon AI App')]
#[PolydockAppStoreFields]
class PolydockAiApp extends PolydockApp implements HasStoreAppFormFields



namespace MyVendor\MyApp;

use FreedomtechHosting\PolydockApp\Attributes\PolydockAppTitle;
use FreedomtechHosting\PolydockAppAmazeeioGeneric\PolydockApp;

#[PolydockAppTitle('My Custom App')]
class MyCustomApp extends PolydockApp
{
    public static string $version = '1.0.0';

    public static function getAppVersion(): string
    {
        return self::$version;
    }

    // Override lifecycle methods as needed
    public function postDeployAppInstance($appInstance)
    {
        $appInstance = parent::postDeployAppInstance($appInstance);

        // Custom post-deploy logic
        $this->info('Custom deployment complete');

        return $appInstance;
    }
}



namespace MyVendor\MyAiApp;

use Filament\Forms;
use FreedomtechHosting\PolydockApp\Attributes\PolydockAppTitle;
use FreedomtechHosting\PolydockApp\Attributes\PolydockAppStoreFields;
use FreedomtechHosting\PolydockAppAmazeeioGeneric\PolydockAiApp;

#[PolydockAppTitle('My AI App')]
#[PolydockAppStoreFields]
class MyAiApp extends PolydockAiApp
{
    public static function getStoreAppFormSchema(): array
    {
        return [
            Forms\Components\Section::make('AI Configuration')
                ->schema([
                    Forms\Components\TextInput::make('api_endpoint')
                        ->url()
                        ->