您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

JournalEntryRepeater.php 797B

1234567891011121314151617181920212223242526272829303132333435
  1. <?php
  2. namespace App\Forms\Components;
  3. use Awcodes\TableRepeater\Components\TableRepeater;
  4. use Closure;
  5. use Illuminate\Contracts\Support\Htmlable;
  6. use Illuminate\Contracts\View\View;
  7. class JournalEntryRepeater extends TableRepeater
  8. {
  9. protected View | Htmlable | Closure | null $footerItem = null;
  10. public function footerItem(View | Htmlable | Closure | null $footer = null): static
  11. {
  12. $this->footerItem = $footer;
  13. return $this;
  14. }
  15. public function getFooterItem(): View | Htmlable | null
  16. {
  17. return $this->evaluate($this->footerItem);
  18. }
  19. public function hasFooterItem(): bool
  20. {
  21. return $this->footerItem !== null;
  22. }
  23. public function getView(): string
  24. {
  25. return 'forms.components.journal-entry-repeater';
  26. }
  27. }