Category: Laravel, Laravel, PHP, PHP

Here is a simple tutorial to do the structure needed in the component of Ant Design TreeSelect (https://ant.design/components/tree-select/) with PHP. First of all, we would create the class Directory with a few attributes

I use Storage::directories from Laravel Facades, but also, you can use another implementation for list the directories given a path. In Laravel, this is maked with Finder Once you create both classes, you can initialize the Formatter with the path that you are interested to list and then call the method listDirectories().
Newsletter

Get the latest Laravel/PHP jobs, events and curated articles straight to your inbox, once a week

Glimpse streamlines Laravel development by seamlessly deploying GitHub pull requests to preview environments with the help of Laravel Forge. Glimpse streamlines Laravel development by seamlessly deploying GitHub pull requests to preview environments with the help of Laravel Forge.
Fathom Analytics | Fast, simple and privacy-focused website analytics. Fathom Analytics | Fast, simple and privacy-focused website analytics.
Shirts painstakingly handcrafted by under-caffeinated developers. Shirts painstakingly handcrafted by under-caffeinated developers.
Community Partners