pelican-panel-mirror/app/Livewire/EndpointSynth.php
2024-06-15 05:14:54 -04:00

27 lines
472 B
PHP

<?php
namespace App\Livewire;
use App\Models\Objects\Endpoint;
use Livewire\Mechanisms\HandleComponents\Synthesizers\Synth;
class EndpointSynth extends Synth
{
public static $key = 'endpoint';
public static function match($target)
{
return $target instanceof Endpoint;
}
public function dehydrate($target)
{
return (string) $target;
}
public function hydrate($value)
{
return new Endpoint($value);
}
}