Option.php 508 B

12345678910111213141516171819202122232425262728
  1. <?php
  2. namespace app\common\facades;
  3. use app\common\services\OptionForm;
  4. use Illuminate\Support\Facades\Facade;
  5. class Option extends Facade
  6. {
  7. /**
  8. * Get the registered name of the component.
  9. *
  10. * @return string
  11. */
  12. protected static function getFacadeAccessor()
  13. {
  14. return 'options';
  15. }
  16. public static function form($id, $title, $callback)
  17. {
  18. $form = new OptionForm($id, $title);
  19. call_user_func($callback, $form);
  20. return $form;
  21. }
  22. }