/** * Forget all of the pushed listeners. * * @return void */ public function forgetPushed() { foreach ($this->listeners as $key => $value) { if (Str::endsWith($key, '_pushed')) { $this->forget($key); } } }
/** * Determine if a given string ends with a given substring. * * @param string $haystack * @param string|array $needles * @return bool */ function ends_with($haystack, $needles) { return Str::endsWith($haystack, $needles); }