菜谱项目

SearchStatistics.php 441B

123456789101112131415161718
  1. <?php
  2. namespace App\Models;
  3. use Illuminate\Database\Eloquent\Model;
  4. use Illuminate\Support\Facades\DB;
  5. class SearchStatistics extends Model
  6. {
  7. protected $table = 'search_statistics';
  8. public $timestamps = false;
  9. public static function selectHotSearch($status = 0)
  10. {
  11. $data = DB::table('search_statistics')->select('id', 'value')->where('status', $status)->limit(10)->get()->toArray();
  12. return $data;
  13. }
  14. }