laravel-filemanager
laravel-filemanager copied to clipboard
How can I add a search box to file manager?
How can I add a search box to file manager?
Hi,
filemanager list all files in folders by default. To add a search box, you will need to modify ItemController::getItems()
to filter the files by the search criterias.
You may simplely add a string fiter on that, however, if you have a large amount of files, for example, thousands or more, you might want to add all these files to a database or a search engine. That requires to modify not only getItems
but also on whenever the file was created, updated and deleted to trigger the database changes.
we have a sample here at https://github.com/UniSharp/laravel-filemanager-plus/blob/master/src/controllers/ItemsController.php#L39 , but it is based on an old and deprecated project.
Any updates on this feature? Really don't feel like making it all myself XD