public function provider($name) { $providers = $this->providers->filter(function ($provider) use($name) { return strtolower($provider->provider) == strtolower($name); }); return $providers->first(); }