SiteAlbumFolder.php 530 B

123456789101112131415161718192021222324252627
  1. <?php
  2. namespace App\Models;
  3. use Dcat\Admin\Traits\HasDateTimeFormatter;
  4. use Dcat\Admin\Traits\ModelTree;
  5. use Illuminate\Database\Eloquent\Model;
  6. class SiteAlbumFolder extends Model
  7. {
  8. use HasDateTimeFormatter;
  9. protected $table = 'site_album_folder';
  10. use HasDateTimeFormatter,
  11. ModelTree {
  12. ModelTree::boot as treeBoot;
  13. }
  14. public function allNodes()
  15. {
  16. return $this->callQueryCallbacks(new static())
  17. ->orderBy($this->getOrderColumn(), 'desc')
  18. ->get();
  19. }
  20. }