src/Group/GroupRepository.php
public function findByName($name, User $actor = null)
    {
        $query = Group::where('name_singular', $name)->orWhere('name_plural', $name);

        return $this->scopeVisibleTo($query, $actor)->first();
    }
public function findByName($name, User $actor = null)
    {
        $query = Group::where('name_singular', $name)->orWhere('name_plural', $name);

        return $this->scopeVisibleTo($query, $actor)->first();
    }
public function findByName ( $ name , User $ actor = null ) { $ query = Group :: where ( 'name_singular' , $ name ) -> orWhere ( 'name_plural' , $ name ) ; return $ this -> scopeVisibleTo ( $ query , $ actor ) -> first ( ) ; }
Find a group by name.

@param string $name
@return User|null
Find a group by name .