/** * Get by * * @param string $key * @param string $value * * @return \App\Widget */ public function getBy($key, $value) { return Widget::where($key, $value)->first(); }