mirror of
https://github.com/pelican-dev/panel.git
synced 2025-06-15 09:21:07 +02:00
27 lines
472 B
PHP
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);
|
|
}
|
|
}
|