12345678910111213141516171819202122 |
- <?php
- namespace App\Models;
- use Illuminate\Database\Eloquent\Model;
- use Illuminate\Support\Facades\DB;
- class SearchRecord extends Model
- {
- protected $table = 'search_record';
- public $timestamps = false;
- public static function insertSearchValue($value, $type = 0)
- {
- $re = DB::table('search_record')->insert([
- 'value' => $value,
- 'type' => $type,
- 'created_at' => time(),
- ]);
- return $re;
- }
- }
|