src/Database/Concerns/IsAbility.php
public function scopeByName($query, $name, $strict = false)
    {
        $names = (array) $name;

        if (! $strict && $name !== '*') {
            $names[] = '*';
        }

        $query->whereIn("{$this->table}.name", $names);
    }
public function scopeByName($query, $name, $strict = false)
    {
        $names = (array) $name;

        if (! $strict && $name !== '*') {
            $names[] = '*';
        }

        $query->whereIn("{$this->table}.name", $names);
    }
public function scopeByName ( $ query , $ name , $ strict = false ) { $ names = ( array ) $ name ; if ( ! $ strict && $ name !== '*' ) { $ names [ ] = '*' ; } $ query -> whereIn ( "{$this->table}.name" , $ names ) ; }
Constrain a query to having the given name.

@param  \Illuminate\Database\Eloquent\Builder|\Illuminate\Database\Query\Builder  $query
@return string|array  $name
@return bool  $strict
@return void
Constrain a query to having the given name .