PHP code example of muharihar / file-finder

1. Go to this page and download the library: Download muharihar/file-finder library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

muharihar / file-finder example snippets


/*
* Package Service Providers...
*/

Muharihar\FileFinder\ServiceProviders\FileFinderServiceProvider::class,

bash
$ php artisan serve
json
{
  "searchKey": "Obama",
  "results": [
    {
      "idx": 41,
      "isDir": false,
      "shortPath": "public/file-finder/folder_peoples/folder_presidents/file_us.txt",
      "extension": "txt",
      "fileSize": 6713,
      "parentPath": "public/file-finder/folder_peoples/folder_presidents",
      "info": {
        "firstPos": 6580,
        "firstStr": "...Obama,http://en.wikipedia.org/wiki/Barack_Obama,20"
      }
    }
  ],
  "resultCount": 1
}