Repositories/Entrust/EntrustRoleRepository.php
public function create(array $data)
    {
        if (! array_key_exists('name', $data)) {
            $data['name'] = Str::slug($data['display_name']);
        }

        return parent::create($data);
    }
public function create(array $data)
    {
        if (! array_key_exists('name', $data)) {
            $data['name'] = Str::slug($data['display_name']);
        }

        return parent::create($data);
    }
public function create ( array $ data ) { if ( ! array_key_exists ( 'name' , $ data ) ) { $ data [ 'name' ] = Str :: slug ( $ data [ 'display_name' ] ) ; } return parent :: create ( $ data ) ; }
create name before creating a new role instance.

@param array $data

@return EloquentRole
create name before creating a new role instance .