public static function blogs($type = null, $data = null) { if ($type and $data) { return Blog::where($type, $data)->get(); } return Blog::all(); }