admin/app/common/facades/Option.php

29 lines
508 B
PHP

<?php
namespace app\common\facades;
use app\common\services\OptionForm;
use Illuminate\Support\Facades\Facade;
class Option extends Facade
{
/**
* Get the registered name of the component.
*
* @return string
*/
protected static function getFacadeAccessor()
{
return 'options';
}
public static function form($id, $title, $callback)
{
$form = new OptionForm($id, $title);
call_user_func($callback, $form);
return $form;
}
}