private function matches($pattern, $event)
    {
        return (Str::contains($pattern, '*') && Str::is($pattern, $event))
            || Str::startsWith($event, $pattern);
    }
private function matches($pattern, $event)
    {
        return (Str::contains($pattern, '*') && Str::is($pattern, $event))
            || Str::startsWith($event, $pattern);
    }
private function matches ( $ pattern , $ event ) { return ( Str :: contains ( $ pattern , '*' ) && Str :: is ( $ pattern , $ event ) ) || Str :: startsWith ( $ event , $ pattern ) ; }
Check whether an event name matches a pattern or not.

@param  string  $pattern
@param  string  $event
@return bool
Check whether an event name matches a pattern or not .