PHP code example of tomatophp / filament-meta

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

    

tomatophp / filament-meta example snippets


use Tomatophp\FilamentMeta\Traits\HasMeta;

class  User extends Model
{
    use HasMeta;
}


use Tomatophp\FilamentMeta\Filament\RelationManager\MetaRelationManager;

public static function getRelations(): array
{
    return [
        MetaRelationManager::class
    ];
}

$user = User::find(1);
$user->meta('key');

$user = User::find(1);
$user->meta('key', 'value');

$user = User::find(1);
$user->meta('key', 'null');

$user = User::find(1);
$user->meta('key', ['value' => 'value']);

return [
    'create' => false
];
bash
php artisan filament-meta:install
bash
php artisan vendor:publish --tag="filament-meta-config"
bash
php artisan vendor:publish --tag="filament-meta-config"
bash
php artisan vendor:publish --tag="filament-meta-views"
bash
php artisan vendor:publish --tag="filament-meta-lang"
bash
php artisan vendor:publish --tag="filament-meta-migrations"
bash
composer analyse