src/Media.php
public function scopeForPathOnDisk(Builder $q, $disk, $path)
    {
        $q->where('disk', $disk)
            ->where('directory', File::cleanDirname($path))
            ->where('filename', pathinfo($path, PATHINFO_FILENAME))
            ->where('extension', pathinfo($path, PATHINFO_EXTENSION));
    }
public function scopeForPathOnDisk(Builder $q, $disk, $path)
    {
        $q->where('disk', $disk)
            ->where('directory', File::cleanDirname($path))
            ->where('filename', pathinfo($path, PATHINFO_FILENAME))
            ->where('extension', pathinfo($path, PATHINFO_EXTENSION));
    }
public function scopeForPathOnDisk ( Builder $ q , $ disk , $ path ) { $ q -> where ( 'disk' , $ disk ) -> where ( 'directory' , File :: cleanDirname ( $ path ) ) -> where ( 'filename' , pathinfo ( $ path , PATHINFO_FILENAME ) ) -> where ( 'extension' , pathinfo ( $ path , PATHINFO_EXTENSION ) ) ; }
Query scope finding media at a path relative to a disk.
@param  \Illuminate\Database\Eloquent\Builder $q
@param  string                                $disk
@param  string                                $path directory, filename and extension
@return void
Query scope finding media at a path relative to a disk .