<?php /** * Created by PhpStorm. * User: Zafar Hayat * Date: 6/26/2020 * Time: 7:06 PM */ namespace App\Services; use Illuminate\Support\Facades\DB; class FileWithDeepSearch { /** * @var PHPFunction */ private $PHPFunction ; /** * @var Common */ private $common ; /** * @var Filters */ private $filters ; public function __construct( PHPFunction $PHPFunction , Common $common , Filters $filters ) { $this -> PHPFunction = $PHPFunction ; $this -> common = $common ; $this -> filters = $filters ; } public function getQuery( array $data ) { $currentDirectoryFilesQuery = $this ->getCurrentDirectoryFilesQuery( $data ); $recursiveQuery = $this ->getRecursiveQuery( $data ); $recursiveQuery = $recursiveQuery ->unionAll( $currentDirectoryFilesQuery ); return $recursiveQuery ; } private function getCurrentDire...