Update (ui): fix word break

Update (top rss keyword): do not show known brands
This commit is contained in:
2023-11-23 10:50:43 +08:00
parent 416f06b344
commit e374875015
14 changed files with 46 additions and 45 deletions

View File

@@ -3,8 +3,8 @@
namespace App\Models;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Support\Facades\DB;
use Illuminate\Support\Facades\Cache;
use Illuminate\Support\Facades\DB;
class HybridTopRssPostKeywords extends Model
{
@@ -16,6 +16,7 @@ class HybridTopRssPostKeywords extends Model
// Override the table and primary key as this is an abstract model
protected $table = null;
protected $primaryKey = null;
// Disable incrementing as this is an abstract model
@@ -30,6 +31,7 @@ public static function get($days = 1, $limit = 10)
$queryResults = DB::table('rss_post_keywords')
->select('value', 'value_lowercased', DB::raw('COUNT(value_lowercased) as value_count'))
->where('created_at', '>=', now()->subDays($days))
->whereNotIn('value_lowercased', ['techcrunch', 'the verge', 'forbes', 'producthunt', ''])
->groupBy('value', 'value_lowercased')
->orderBy(DB::raw('COUNT(value_lowercased)'), 'desc')
->limit($limit)