src/Media.php
public function scopeWhereBasename(Builder $q, $basename)
    {
        $q->where('filename', pathinfo($basename, PATHINFO_FILENAME))
            ->where('extension', pathinfo($basename, PATHINFO_EXTENSION));
    }
public function scopeWhereBasename(Builder $q, $basename)
    {
        $q->where('filename', pathinfo($basename, PATHINFO_FILENAME))
            ->where('extension', pathinfo($basename, PATHINFO_EXTENSION));
    }
public function scopeWhereBasename ( Builder $ q , $ basename ) { $ q -> where ( 'filename' , pathinfo ( $ basename , PATHINFO_FILENAME ) ) -> where ( 'extension' , pathinfo ( $ basename , PATHINFO_EXTENSION ) ) ; }
Query scope for finding media by basename.
@param  \Illuminate\Database\Eloquent\Builder $q
@param  string                                $basename filename and extension
@return void
Query scope for finding media by basename .