File tree Expand file tree Collapse file tree 1 file changed +6
-5
lines changed Expand file tree Collapse file tree 1 file changed +6
-5
lines changed Original file line number Diff line number Diff line change 88use SolutionForest \FilamentTree \Resources \Pages \TreePage ;
99use Statikbe \FilamentFlexibleContentBlockPages \Facades \FilamentFlexibleContentBlockPages ;
1010use Statikbe \FilamentFlexibleContentBlockPages \FilamentFlexibleContentBlockPagesConfig ;
11+ use Statikbe \FilamentFlexibleContentBlocks \Models \Contracts \HasPageAttributes ;
1112use Statikbe \FilamentFlexibleContentBlocks \Models \Contracts \Linkable ;
1213
1314class ManagePageTree extends TreePage
@@ -74,9 +75,9 @@ protected function getFooterWidgets(): array
7475 return [];
7576 }
7677
77- // CUSTOMIZE ICON OF EACH RECORD, CAN DELETE
78- // public function getTreeRecordIcon(?\Illuminate\Database\Eloquent\Model $record = null): ?string
79- // {
80- // return null;
81- // }
78+ public function getTreeRecordIcon (? Model $ record = null ): ? string
79+ {
80+ /** @var HasPageAttributes $record */
81+ return $ record ?->isPublished() ? null : ' heroicon-o-eye-slash ' ;
82+ }
8283}
You can’t perform that action at this time.
0 commit comments