TDoG-Skin/app/Services/Facades/Option.php

24 lines
435 B
PHP
Raw Permalink Normal View History

2024-08-17 18:43:48 +08:00
<?php
namespace App\Services\Facades;
use App\Services\OptionForm;
use Illuminate\Support\Facades\Facade;
class Option extends Facade
{
protected static function getFacadeAccessor()
{
return 'options';
}
public static function form(string $id, string $title, $callback): OptionForm
{
$form = new OptionForm($id, $title);
call_user_func($callback, $form);
return $form;
}
}